Developing Microsoft SQL Server Databases — Question 50

You have a SQL Server database.
The recovery model is set to full. The transaction log is backed up every night.
You discover that the transaction log never decreases in size.
You execute the DBCC SHRINKFILE statement for the transaction log and you discover that the transaction log is unaffected.
You need to ensure that you can reduce the size of the transaction log.
What should you do first?

Answer options

Correct answer: A

Explanation

The correct answer is A because truncating the transaction log is necessary to mark space as reusable, allowing it to shrink. The other options do not directly address the need to truncate the log, with killing transactions potentially leading to data loss and changing the recovery model affecting restore capabilities.