Restoring a SQL Server from a backup file

by Marshall on March 5, 2004

To restore a SQL Server database from backup file only, do the following

RESTORE FILELISTONLY FROM DISK=’path of .BAK’

Then, do the following

RESTORE DATABASE databasename
FROM DISK = ‘C:\Program Files\Microsoft SQL Server\BACKUP\dbasebackup.BAK’
WITH STATS = 10, REPLACE,
MOVE ‘dbase’ TO ‘D:\Test\dbase.mdf’,
MOVE ‘dbase_logTO ‘D:\Test\dbase.ldf’

Where dbase and dbase_log are outputs from the first command

Leave your comment

Required.

Required. Not published.

If you have one.