sql server data base restore script

Friday, July 03, 2009 10:29 AM | Leave a reply »

this is a quick trick that i googled from bits and pieces in a caffe when my laptop didn’t have a Management studio installed

i found a way to execute sql scripts to my instance of sql express

well to restore you need to have the logical names of files in the database backup to know that

just type

RESTORE FILELISTONLY
FROM DISK = ‘

this will display all the logical file’s in the backup in the result sets

you’ll need the logical file names for the coming script (the actual restore)

 

RESTORE DATABASE
FROM DISK = ‘
WITH MOVE ‘’ TO '',
MOVE '' TO ''



Comments

No comments posted yet.

Leave a Reply



 

Please add 6 and 3 and type the answer here: