I was looking into the steps of how to Restore Database Backup using SQL Script (T-SQL). Here are the steps:
Database
YourDBhas full backupYourBackUpFile.bak. It can be restored using following two steps:Step 1: Retrieve the logical file name of the database from the backup.
RESTORE FILELISTONLY FROM DISK = 'D:BackUpYourBackUpFile.bak' GOStep 2: Use the values in the
LogicalNamecolumn in the following step.----Make Database to single user Mode ALTER DATABASE YourDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE ----Restore Database RESTORE DATABASE YourDB FROM DISK = 'D:BackUpYourBackUpFile.bak' WITH MOVE 'YourMDFLogicalName' TO 'D:DataYourMDFFile.mdf', MOVE 'YourLDFLogicalName' TO 'D:DataYourLDFFile.ldf'
I am just having problem on how to get the YourMDFLogicalName and YourLDFLogicalName.
Can any one help me with that?
UPDATE
According to Microsoft site: