Provisioning SQL Databases — Question 13
You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transaction log file does not exceed 2 GB.
What should you do?
Answer options
- A. Execute sp_configure 'max log size', 2G.
- B. use the ALTER DATABASE...SET LOGFILE command along with the maxsize parameter.
- C. In SQL Server Management Studio, right-click the instance and select Database Settings. Set the maximum size of the file for the transaction log.
- D. in SQL Server Management Studio, right-click the database, select Properties, and then click Files. Open the Transaction log Autogrowth window and set the
Correct answer: B
Explanation
The correct answer is B because using the ALTER DATABASE...SET LOGFILE command with the maxsize parameter directly allows you to set a limit on the transaction log file size. Option A is incorrect as there is no 'max log size' configuration setting in SQL Server. Option C does not provide the correct method to enforce a maximum size for the transaction log, and Option D only addresses autogrowth settings, which do not limit the file size.