You administer a Microsoft SQL Server 2012 database.
You need to ensure that the size of the transactionlog file does not exceed 2 GB.
What should you do?
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 maximum size of the file.
Explanation:
Verified answer as correct.
If want to increase the file size with the TSQL use the below Query.
USE master;
GO
ALTER DATABASE AdventureWorks2012
MODIFY FILE
(NAME = test1dat3,
SIZE = 20MB);
GO
In this case option B is wrong bcoz incorrect sytax near SET.
is this correct?
Both Options C & D are definitely wrong. SSMS => instance => database settings =>… does not allow you to alter the LOG size. SSMS => database_properties => file =>… does not allow you to specify a Max integer value; only a percentage increase, which has to be set a LOG FILE creation.
To change the LOGFILE size, you have to use the:
ALTER DATABASE db_name
MODIFY LOG log_name SIZE command;
actually SSMS => database_properties => file => .. does allow you to set the autogrowth limit in megabytes. you can select percent or megabytes. hence you can use the GUI to limit the Auto growth of the log file. answer D is correct.
and in the max file size you only have to options: Unlimited and limited(MB). so Answer D is the correct 1