SQLSERVER manual growth of log files and data files

Source: Internet
Author: User
SQLSERVER manual growth of log files and data files manual growth of log files, in fact, is to modify the size of the log file unit is MB set the size of the log file is 2048 MBALTERDATABASE [GPOSDB] MODIFYFILE (nameGPOSDB_Log, size2048) EXECsys. [sp_helpdb] @ d

SQLSERVER manual Log File growth and data file manual Log File growth, in fact, the unit for modifying the log FILE size is MB. Set the log FILE size to 2048 mb alter database [GPOSDB] modify file (name = GPOSDB_Log, size = 2048) EXEC sys. [sp_helpdb] @ d

SQLSERVER Manual Growth Logs FileAnd Data File

ManualGrowthLogsFileIs actually modifyingLogsFileThe unit of the size is MB.

The following settingsLogsFileThe size is 2048 MB.

ALTER DATABASE [GPOSDB] MODIFY FILE(name=GPOSDB_Log,size=2048)

EXEC sys. [sp_helpdb] @ dbname = [GPOSDB] -- sysname

-- ShrinkLogsFileUSE [GPOSDB] go alter database [GPOSDB] set recovery simple; GO -- SET the simple recovery mode dbcc shrinkfile (GPOSDB_Log, 1 ); GO -- restore to original mode alter database [GPOSDB] set recovery full; GO

-----------------------------------------------------------------

--ManualGrowthDataFileIs actually modifyingDataFileThe unit of the size is set below MB.LogsFileThe size is 2048 MB.

ALTER DATABASE [GPOSDB] MODIFY FILE(name=GPOSDB_Data,size=2048)

EXEC sys. [sp_helpdb] @ dbname = [GPOSDB] -- sysname

-- ShrinkDataFileShrink to 2 MB

USE [GPOSDB] GO DBCC SHRINKFILE (N'GPOSDB_Data' , 2) GO



If anything is wrong, you are welcome to make a brick o

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.