PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the size of the transactionlog file does not exceed 2 GB

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?

PrepAway - Latest Free Exam Questions & Answers

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.

5 Comments on “You need to ensure that the size of the transactionlog file does not exceed 2 GB

  1. YaDaV says:

    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.




    0



    0
  2. Yommy O. says:

    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;




    0



    2
    1. Islam says:

      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.




      2



      0

Leave a Reply