PrepAway - Latest Free Exam Questions & Answers

Which restore statement should you use to identify the backup file that belongs to the Sql1 database?

You are the database administrator for your company. You maintain a SQL Server 2008 instance named Prod1 .This instance has two databases named Sql1 and Sql2.
You take regular backups of these two databases, andstore them on tape drive media sets. The filenames in the two databases are the same.
Due to a media failure, you lose some data files of the Sql1 database.
You are required to restore the data files ofthe Sql1 database, but you notice that you have used the same name for the backup of Sql1 and Sql2.
Which restore statement should you use to identify the backup file that belongs to the Sql1 database?

PrepAway - Latest Free Exam Questions & Answers

A.
RESTORE LABELONLY

B.
RESTORE VERIFYONLY

C.
RESTORE HEADERONLY

D.
RESTORE FILELISTONLY

Explanation:

You should use the RESTORE HEADERONLY statement. This statement provides details regarding the backupdatabase and returns all the backup’s header information. The output of this statement will enable you todifferentiate between the two backups. You should not use the RESTORE LABELONLY statement. This statement returns a result set containinginformation about the backup media on which the backup is stored. The output of this statement includes onlypartial header information. In this scenario, you must identify the details about the databases to which each of thebackups belong. Therefore, you cannot use the RESTORE LABELONLY statement. You should not use the
RESTORE VERIFYONLY statement. This statement only verifies whether the backupdata is complete. This statement will not provide details of the database backups. You should not use the RESTORE FILELISTONLY statement. This statement returns a list of data files and logfiles in the backup. In this scenario, you are required to differentiate between the two database backups.Therefore, you cannot use the RESTORE FILELISTONLY statement because the scenario states that the twodatabases have the same file name.

Objective:
Maintaining a SQL Server Database

Sub-Objective:
Restore databases.

References:
TechNet > TechNet Library > Server Products and Technologies > SQL Server > SQL Server 2008 > ProductDocumentation > SQL Server 2008 Books Online > Database Engine > Technical Reference > Transact-SQLReference > RESTORE Statements for Restoring, Recovering, and Managing Backups (Transact-SQL) >RESTORE HEADERONLY (Transact-SQL)


Leave a Reply