I have a website I'm ready to test on the server it will call home. I just got connected to the remote SQL server that it will be using. As I've been creating the site, I've been using the default SQL Express set-up in Visual Studio. Is there a way to have Visual Studio create all those default tables, procedures, etc. OR is there a way to copy all of that stuff from the SQL Express running on my machine to the remote SQL Server 2005?
-Mathminded
There are many ways to move the database, but the best is Backup and Restore because it moves everything including permissions, you Backup the database locally and put the .bak file in the location below in the remote server and use the Backup and Restore wizard SQL Server will create the file path just make sure the path is correct don't try to create the path because SQL Server gets confused if you do. I have created a FAQ that covers all the ways to move a database, if you use another method remember to also move the permissions. Hope this helps.
C:\Program Files\Microsoft SQL Server\MSSQL\Backup
http://forums.asp.net/thread/1454694.aspx|||Thanks, Caddre. Before I got your message I had just found this link (http://www.c-sharpcorner.com/uploadfile/dsdaf/104012006083052am/1.aspx) and followed those instructions. It created all the tables, views, and stored procedures that had been created on my local SQL Express installation. From what I understand of the Backup and Restore method, I have to be able to load the backup file on the remote server, right? I don't think I have access to do that. I'm planning to call the database administrator tomorrow, anyway, because the Website Administration Tool in VS2005 says I don't have permission to execute 'aspnet_CheckSchemaVersion' so I'm not able to create new users. Crazy. :-)
For future readers of this thread, if you end up using the link in this message, and you have a problem running the tool like I did, you may be interested in this quote fromhttp://quickstarts.asp.net/QuickStartv20/aspnet/doc/management/tools.aspx :
"To configure and install databases on a SQL server to use these ASP.NET features, you can use theaspnet_regsql tool. This tool can be found in the version-specific framework directory, under theMicrosoft.NET\Framework subdirectory of your Windows system folder."
As always, thank you for your help, Caddre.
-Mathminded
|||FYI for anyone who runs into the problem of not having permission to execute that stored procedure. I used the Microsoft SQL Server Management Studio Express to add my database user to the aspnet_Membership_FullAccess role and that took care of it. I think the backup and restore method that Caddre mentioned probably takes care of problems like that, but unfortunately I didn't have access to load files on the remote server. If you can do it her way, I suggest doing that since she has about a million times more experience than I do (that's probably an understatement . . . it's probably closer to a billion or so). But, if you're in the situation I was in, this did work for me.
Happy SQLing!
-Mathminded
|||addition to my previous post:
I had to add my database user to ALL of the roles ending in "_FullAccess" in order to fully use the Website Administration Tool.
No comments:
Post a Comment