Which code segment should you execute?

You have a SQL Server 2012 database named DB1. You have a backup device named
Device1.
You discover that the log file for the database is full.
You need to ensure that DB1 can complete transactions. The solution must not affect the
chain of log sequence numbers (LSNs).
Which code segment should you execute?

You have a SQL Server 2012 database named DB1. You have a backup device named
Device1.
You discover that the log file for the database is full.
You need to ensure that DB1 can complete transactions. The solution must not affect the
chain of log sequence numbers (LSNs).
Which code segment should you execute?

A.
BACKUPLOG DB1 TO Device1 WITH COPY_ONLY

B.
BACKUPLOG DB1 TO Device1 WITH NORECOVZRY

C.
BACKUPLOG D31 TO Device1 WITH TRUNCATE_ONLY

D.
BACKUPLOG D31 TO Device1

Explanation:
http://msdn.microsoft.com/en-us/library/ms186865.aspx
http://msdn.microsoft.com/en-us/library/ms179478.aspx
http://msdn.microsoft.com/en-us/library/ms190925.aspx



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Kevin

Kevin

I’ll pick option A.

BACKUP LOG DB1 TO DISK = ‘R:\Tran_Logs\DB1.trn’ WITH COPY_ONLY;

alberto

alberto

@Kevin,
option A is incorrect
COPY_ONLY dos not truncate the log, it just perform a backup and leave the log unchanged.
If the log is full, the only option is truncate it by performing a regular backup.

Option D is the right choice.