views:

193

answers:

5

I have a brand new database on an ISP which I intend to use to build an ASP.NET data-driven website. However, I would like to build the whole thing locally and transplant the database to the ISP.

I have TCP/IP access (i.e. I can connect to the remote database directly thru SQL Server Management Studio Express), but I do not have Terminal Services access, as this is a database shared with other users of the ISP.

Is there a simple way to "replicate" my local development database to the remote server?

+4  A: 

One way is to use something like the Database Publishing Wizard to create an SQL script, and then run that script in SQL Server Management studio in the remote database.

Apparently this is integrated in Visual Studio 2008 (didn't know that before).

Fredrik Mörk
Sweet! Thank you. I will use the one integrated into VS2008.
Robert Harvey
+1  A: 

I just had a similar problem. I downloaded and used the SQL Server Pulishing Wizard. Can be found here. You end up with a single script file that you apply to your database and it creates everything including the data.

JBrooks
A: 

You could just backup the database on your local server and restore it onto the target server. This'd be easier if the collation of the two servers were the same, but even that's not a show-stopper. Scripting the database is fine while it's empty, but it gets trickier if you want to move it back and forth once it has data in it.

Gary McGill
I think once the website goes live, the changes to the database schema will be minimal. If there are any, I can just make the changes using Sql Server Management Studio.
Robert Harvey
A: 

How about putting your database in the App_Data folder? You can create it straight from Visual Studio. It should then auto-mount. Then you should be able to just copy it over with the rest of the files.

Dan Diplo
I doubt this would work. The ISP allows you to create or delete databases on their SQL Server through a web page. They don't allow any other sort of mounting procedures.
Robert Harvey
A: 

Assuming you have FTP access, upload a "COPY ONLY" backup of the database to the server and then use Management Studio express to restore the backup and browse to the file and restore it on the server. Should work ok if the SQL version is compatable.

djangofan