Tuesday, March 27, 2012

Backup SQLExpress database

I have installed the community preview version of SQL Express (I think the April preview version). I can't find a way to backup a database created with the SQL Express UI tools. Can you point me in the right direction? Thanks, Leo

Hi,

I'm not very familar with Express Manager Tool. But if you do not find anything like dts or export/import function of dbs. I woul just write a small script that takes all tables into a dataset and would then write that dataset into a different database base or write it to a xml-file, using the writexml method of the dataset class.|||

You should be able to use the same T-SQL BACKUP syntax that works with any other database.

Something like:
SQLCMD -S machine\instance
SQLCMD> BACKUP DATABASE [foo] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\foo.bak'
Books Online has the full syntax of the BACKUP DATABASE command.

|||thanks

No comments:

Post a Comment