sqlserver database modification log file size limit

一 Version: SQL Server 2008

Two requirements:

Log size is limited to  5G

Automatically grow to 10M each time

Method 1 : Use statement modification

USE [master]

GO

ALTER DATABASE [DMS] MODIFY FILE ( NAME = N'DMS_log', MAXSIZE = 5120000KB , FILEGROWTH = 10240KB )

GO

ALTER DATABASE [Security] MODIFY FILE ( NAME = N'Security_log', MAXSIZE = 5120000KB , FILEGROWTH = 10240KB )

GO

Modify the initial size of the log file to 1024M

USE [SunLightIntf_NEW]

GO

DBCC SHRINKFILE (N'SunLightIntf_TEST_log' , 1024)

GO

————————————————————————————————————————————

Chongqing Sizhuang's March 2018 OCP? Certification training weekend class is being taught face-to-face, welcome to contact for audition! The new OCP weekend class will start on April 1, and registration is hot! For more details, visit the Sizhuang website to consult online customer service.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325079809&siteId=291194637