nerdexam
Microsoft

70-467 · Question #416

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 correct answer is B. BACKUP LOG DB1 TO Device1. A standard transaction log backup truncates inactive log space after writing it to the backup device, freeing room for new transactions while keeping the LSN chain intact.

Role of Transact-SQL and the Database Engine in Enterprise IT

Question

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?

Exhibit

70-467 question #416 exhibit

Options

  • ABACKUP LCG DB1 TO Device1 WITH COPY_ONLY
  • BBACKUP LOG DB1 TO Device1
  • CBACKUP LOG DB1 TO Device1 WITH NCRECCVERY
  • DBACKUP LOG D31 TO Device1 WITH TRUNCATE ONLY

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    88% (22)
  • D
    4% (1)

Why each option

A standard transaction log backup truncates inactive log space after writing it to the backup device, freeing room for new transactions while keeping the LSN chain intact.

ABACKUP LCG DB1 TO Device1 WITH COPY_ONLY

BACKUP LOG with COPY_ONLY backs up the log without truncating it, so no log space is freed and the full-log condition persists.

BBACKUP LOG DB1 TO Device1Correct

BACKUP LOG DB1 TO Device1 performs a full transaction log backup, capturing all log records since the last log backup and then marking inactive virtual log files as reusable, which directly frees the space causing the full-log condition. Unlike COPY_ONLY or TRUNCATE_ONLY variants, this operation maintains the unbroken sequence of LSNs required for point-in-time restore capability. It is the correct solution when the goal is both freeing log space and preserving the backup chain.

CBACKUP LOG DB1 TO Device1 WITH NCRECCVERY

NORECOVERY is a restore option that leaves a database in a restoring state; it is not a valid BACKUP LOG option for freeing log space on a live database.

DBACKUP LOG D31 TO Device1 WITH TRUNCATE ONLY

TRUNCATE_ONLY was removed in SQL Server 2008 and does not exist in SQL Server 2012; it also broke the LSN chain by discarding log records without backing them up.

Concept tested: SQL Server transaction log backup and LSN chain preservation

Source: https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/transaction-log-backups-sql-server

Topics

#transaction log backup#LSN chain#SQL Server backup#log management

Community Discussion

No community discussion yet for this question.

Full 70-467 Practice