Monday, July 13, 2009

Backup using Query in Sql Server

Hello Guys


Execute the below query for create backup file.


EXEC sp_addumpdevice 'disk', 'MyBackupDevice', 'D:\Shared\MyBackup.bak'
BACKUP DATABASE Test TO MyBackupDevice



Here "D:\Shared\MyBackup.bak" is the path of the back up file.
"Test" is the name of database.

Execute it u will get the back up file at "D:\Shared\MyBackup.bak" location.


Thanks & Regards
Jignesh Patel

No comments:

Post a Comment