Wednesday, March 7, 2012

How do I export an MDF file to another DB with SQL Server 2005?

Hi whoever can help,

I have created a web site using VWD platform.

DB tables have been created with the build in facility within Visual Web Developer tool.

Now that I have hosted my site (towardes production) I do need to pupulate/create all the tables on the hosting server (that includes ASPNETDB tables).

I guess some export tool can help (have tried with SQL Server Management Studio Express but I can not figure out how to perform the task.

Can you please help on that.

Thanks & Best Regards

hi,

if you can "copy" the database's files (.Mdf and .Ldf) to the web hosting server, you can execute an attach of the database (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_1up1.asp ) via some sort of gui provided by your hoster...

or, you can generate the Data Definition Language scripts to create that objects via SQL Server Management Studio Express (or amScript, a free tool of mine you can find in the Download2005 area of my site, see my sign.)... then you have to execute those scripts (again, via some sort of gui provided by your hoster).. as regard the "data" part, you have to provide a way to generate INSERT INTO scripts (currently working on such a free tool as well) or BCP (Bulk Copy Program, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_impt_bcp_2e5s.asp, http://msdn2.microsoft.com/en-us/library/ms162802.aspx) to export theme to file and then bulk insert theme onto the destination server...

regards

No comments:

Post a Comment