Express SQL

Discussion in 'Databases' started by jaa17, Mar 8, 2011.

  1. Hi,
    I have just set up an account with you today and have spent pretty much all day trying to work out how to set up my database on your site.

    I have the express editions of everything.

    Is there any way of just manually setting up my database on your site? Ie, just typing in the table names and each element, but doing so on your site?

    Hope you can help.
     
  2. Ray

    Ray

    You could either recreate your database on our SQL server manually our try using the Restore/Backup tool inside the Winhost control panel.

    If you are going to recreate your database manually you will need to use SQL Server Management Studio to connect to our SQL server. Try looking at this kb article.

    http://support.Winhost.com/KB/a499/getting-started-with-your-sql-2008-database.aspx
    http://support.Winhost.com/KB/a689/how-to-connect-to-sql-server-2008-using-sql-server.aspx

    If you are going to use the Restore/Backup tool inside the Winhost control panel, try referencing this kb article.

    http://support.Winhost.com/KB/a771/how-do-i-generate-or-restore-a-backup-of-my-database.aspx

    Another way to migrate your database from your local computer to our SQL server is to use the Database Publishing Wizard.

    http://support.Winhost.com/KB/a694/publishing-your-sql-2008-database-to-Winhost-sql-2008-server.aspx
     
    Last edited by a moderator: Oct 14, 2015
  3. Thanks for the reply. I have been looking at these but am completely bemused. When answering this, please pretent I have just landed on earth from Mars and am the stupidest person/martian you have ever met.

    I am using the database wizard. I have opened my sql script into Microsoft SQL Server Management Studio and then I do not have a clue what to do next. I have read the kb article and have even read a former forum post where similar questions occured but am still totally in the dark as to what to do.

    You say I have to 'type the SQL server name provided'.

    OK. On your site, say my database is called:

    DB_12345_1

    Where do I type this? Is this at the top of the sql file I have just loaded into MS SQL Server Manag. Studio?

    This file starts with:

    /****** Object: Table [dbo].[activeGuests] Script Date: 03/08/2011 21:04:10 ******/
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[activeGuests]') AND type in (N'U'))
    DROP TABLE [dbo].[activeGuests]
    GO

    So do I write it just before the first line? What do I exactly write in my particular case. (If you need to know my password, pretent it is 'pass1').

    Then you say:

    'Choose SQL Server Authentication in the "Authentication" drop down box.'

    ???What drop down box is this? Where am I looking? Is this in the MS SQL Server Manag. Studio?

    Then you say:

    'Input your database login and password from Control Panel '

    I know my password - that is my password I log into the control panel with on your site. But what is my database login?

    Then you say:

    Once the script is opened, navigate to the very top of the page and type:
    USE [database name] (without the brackets)
    GO
    Click the "Execute" button.

    I can see the Execute button (whoo-hoo). So hopefully this will work then. If I can work out everything else.

    Hope you can help.
     
  4. OK, I have found a bit more out, but most of the questions in the above still hold.

    By Clicking File|Connect Object Explorer I get something with a Authentication drop down box. So how do I fill this in?

    Server Type: Is this Database Engine'?
    Server Name: This automatically filling in COMPUTER in this box, which is where my databases are stored on my local machine.
    Authentication: SQL Server Authentication (found this in your kb articles)
    Login: Dont have a clue what this is
    Password: Is this is this password I chose when login into your control panel?

    All the other questions hold in the previous post.
     
  5. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015
  6. Yes i have. But without an example it means very little to someone who is setting up a database on a server for the first time.

    Server Type: Database Engine (This one is ok)
    Server Name: [The SQL server name found in Control Panel Site Info Manager/MS SQL 2008] (Is this the DB_12345_1?)
    Authentication: SQL Server Authentication (This one is OK)
    Login: [SQL 2008 Login name] (I have no idea what this is. Is this my member number I use to log into the control panel, eg 0011111)
    Password: [SQL 2008 Password] (I have no idea what this is. Is it the password I use to log into the control panel?)
     
  7. Ray

    Ray

    You will find all these information in your Winhost control panel. Log into your Winhost control panel and click on the tab marked Sites.

    Find the site account you want and click on the link "Manage" and it will take you to the Site Info Manager for that Site account. Click on MS SQL 2008 button to take you to the database manager within the Winhost control panel.

    If you do not see anything in there then create the database first. Once you create the database, it will tell you the SQL server name, the DB name and DB login. From there you can also reset the password to your database.
     
    Last edited by a moderator: Oct 14, 2015
  8. Thanks Ray, I am a little bit further forward.

    (However, I think you can make you kb files a little more newbie friendly by giving examples. You call it one thing in the kb articles and another on the page https://cp.Winhost.com/sites/mssql2008manage.aspx.)

    Eg at the bottom of the kb page have you considered saying something like:

    Example:
    Server Type: Database Engine
    Server Name: s11.Winhost.com (or whatever is next to Database Server on https://cp.Winhost.com/sites/mssql2008manage.aspx).
    Authentication: SQL Server Authentication
    Login: DB_????? (or whatever is next to Database User on https://cp.Winhost.com/sites/mssql2008manage.aspx)
    Password: ??? (The password you log into the control panel with if or your new password if you have edited it on https://cp.Winhost.com/sites/mssql2008manage.aspx)

    It would make it so much more easier.

    The last question (I hope) I still do not know is I have to write:

    USE [database name] (without the brackets)
    GO

    somewhere.

    Is this at the top of the sql file I have loaded into Microsoft SQL Management Studio?

    Can I also check if my database is called DB_11111_1 would this be:

    USE DB_11111_1
    GO

    (ie without the user on the end this time?)
     
    Last edited by a moderator: Oct 14, 2015
  9. I think I have it working.

    Wow, this is great. Thanks Ray.
     
  10. Nope. I can connect but i cannot seem to set up the database tables with the sql script.

    Can I set them up manually?

    (Ie in Manegment Studio can I right click the Tables folder and create new table. Will this set it up on the site? Can I edit them afterwards?)
     
  11. Ray

    Ray

    Yes you can do this. But what is the error you are getting when you try to run the SQL script against the Winhost SQL server?
     
    Last edited by a moderator: Oct 14, 2015
  12. There does not seem to be an error. Its just that none of the tables appear.

    In the messages it says:

    (1 row(s) affected)

    (1 row(s) affected)

    (1 row(s) affected)

    all the way down.

    Can I check I write

    USE DB_11111_1 (where the latter is my database name)
    GO

    at the top of this sql page that loads in?

    So the top of my sql page I load looks something like this:

    USE DB_11111_1
    GO
    /****** Object: Table [dbo].[activeGuests] Script Date: 03/08/2011 21:04:10 ******/
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[activeGuests]') AND type in (N'U'))
    DROP TABLE [dbo].[activeGuests]
    GO
    /****** Object: Table [dbo].[activeMembers] Script Date: 03/08/2011 21:04:10 ******/
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[activeMembers]') AND type in (N'U'))
    DROP TABLE [dbo].[activeMembers]
    GO
     
  13. Ray

    Ray

    What DB is this "DB_11111_1"? I checked our system and I cannot find an active database with this name.
     
  14. I didn't think it was a good idea to post my real database name. I have sent you the real one in a private message.

    There should be several tables in my database. activeGuests, activeMembers etc if the sql script has worked.

    I can only see the one I have created manually (not through the sql script) which is activeGuests.
     
  15. Ray

    Ray

    This is really hard to tell since I can see the tables you are referring to when I query your database.


    1> select name from sys.tables
    2> go
    .....

    (8 rows affected)
    1>

    Did you create these tables manually yourself?
     
  16. Yes I can see them now when I use MS SQL Server Management Tool. I could not when I first ran the script. I do not understand why I could not see them before.

    Thanks.

    Is there anywhere on cp.Winhost.com where I can see the structure independently of the SQL Management Tool?

    Where did you run the commands:

    1> select name from sys.tables
    2> go
     
    Last edited by a moderator: Oct 14, 2015
  17. Ray

    Ray

    Sometimes with SSMS when you run the script you have to log off and log back on to the server. Unfortunately we really do not have a SQL admin tool inside the Winhost control panel. SSMS is our primary method in which you can view your database and all the objects and tables inside it. The tool I used is actually the MS DOS command prompt. When you install SQL Server Management Studio it should have also installed the tool called "sqlcmd". It is the newest version to "osql". It is the SQL command line tool that works hand in hand with MS DOS. It basically makes a connection to the SQL server provided you input the SQL server name and proper DB login. Once there you can call on T-SQL syntax to monitor, view, and even modify your database.
     
    Last edited by a moderator: Oct 14, 2015
  18. Thanks Ray. You have been a massive help.

    PS. I found out about Winhost over on the Silverlight Forums. Loads of people were saying how good Winhost is, including how good this forum area is.

    PPS. I have sent you a private message.
     

Share This Page