Restore DB using script

RESTORE FILELISTONLYFROM

DISK = ‘C:\DB.BAK

‘GO

RESTORE DATABASE DBLogicalName

FROM DISK = ‘C:\DB.BAK’WITH

MOVE ‘YourMDFLogicalName’TO ‘D:DataYourMDFFile.mdf’,

MOVE ‘YourLDFLogicalName’ TO ‘D:DataYourLDFFile.ldf’

got it from the following link :

http://blog.sqlauthority.com/2007/02/25/sql-server-restore-database-backup-using-sql-script-t-sql/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: