views:

250

answers:

2

i have taken the default asp.net mvc template and customized to work for me. I want to now upload this to my hosting provider.

how do i get the sql server database into my server. Do i just upload the ASPNETDB.mdf file. What is this file actually? Does it represent the whole database.

Can i simply copy that file around to migrate my database.

+2  A: 

The MDF file is the data file for your database. You would normally attach the database to the server instance, or take a backup of the database and restore it. However with your hosting provider this may not be possible, and you may need to create all the database objects again (via SQL scripts) and import any data that you require.

Attaching a database

Restoring a database

revelator
A: 

Take a look at the "Database Publishing Wizard" from Microsoft. I hosted my site on GoDaddy and used it to get my database and data across.

Of course I never used the default MDF file. I actually created a primary database, imported the MDF file into it and added my own tables. And I used the DBW for that as well.

You can find the Database Publishing Wizard here.

griegs