You administer a SQL Server instance. A database named DB1 is corrupted.
Backups of DB1 are available on a disk backup device located at Z:\Backups\Backup.bak. The backup device has the following backups sets:
* a full database backup that is the first backup set on the device (FILE = 1)
* a differential database backup that is the second backup set on the device (FILE = 2)
* a transaction log backup that is the third backup set on the device (FILE = 3) You restore the full database backup and the differential database backup without rolling back the uncommitted transactions.
You need to restore the transaction log backup and ensure the database is ready for use after restoring the transaction log.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct locations. Each Transact-SQL segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

Correct Answer:

Explanation

The RESTORE restores backups taken using the BACKUP command. You can do restore a transaction log onto a database (a transaction log restore).
NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next statement in the sequence. In this case, the restore sequence can restore other backups and roll them forward.
RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for the current backup.
Recovering the database requires that the entire set of data being restored (the roll forward set) is consistent with the database. If the roll forward set has not been rolled forward far enough to be consistent with the database and RECOVERY is specified, the Database Engine issues an error.
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
Recent Comments (The most recent comments are at the top.)
I think the correct answer should be Restore Log, DB1 from.... With FILE = 3, Recovery.
Its already mentioned in the scenario that File 3 is the transaction log and also that the full database backup and the differential backup have been restored already without rolling back the uncommitted transactions.
Reference : https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql?view=sql-server-2017