Tuesday, March 27, 2012

BackUp SQLEXPRESS mdf files

Hi All,

I searched the archives but I could not find any useful stuff for me.

I can backup a database on SQLExpress like

USE master
EXEC sp_addumpdevice 'disk', 'Store_1', 'c:\Store_1.dat'
BACKUP DATABASE Store TO Store_1

Here is my problem:

If I use logins,roles etc. in an application automatically a mdf file is created. Or I can create a new sql database. SQLExpress dynamically use the mdf file when connection string defined.

This mdf file is not defined as a database on SQLExpress. Because SQLExpress has not a gui, I cannot see the registered database.

How can I backup any sqlexpress mdf file without deattaching or attaching?

Thanks

That has changed there is now a Management tool now download it install it and use the backup and restore wizard or modify the code in the thread below and use it. Hope this helps.

http://forums.asp.net/thread/1049663.aspx
http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx

No comments:

Post a Comment