T-SQL for autogrowth of multiple data files
Posted
by ddono25
on Server Fault
See other posts from Server Fault
or by ddono25
Published on 2010-05-17T20:25:30Z
Indexed on
2010/05/17
20:31 UTC
Read the original article
Hit count: 289
I can't seem to figure out the problems with my script to alter SQL Server 2008 database and file growth. There are two data files and a log file, all which need to have Autogrowth ON. Does this look completely wrong? Thanks!
USE MASTER
GO
ALTER DATABASE BigDB
MODIFY FILE
( NAME = BIGDBPPE,
FILENAME = "H:\MSSQL\Data\BigDB.mdf",
MAXSIZE = UNLIMITED,
FILEGROWTH = 2000MB)
USE MASTER
GO
ALTER DATABASE BigDB
MODIFY FILE
( NAME = BIGDBPPE1,
FILENAME = "K:\MSSQL\Data\BigDB_data1.ndf",
MAXSIZE = UNLIMITED,
FILEGROWTH = 2000MB)
USE MASTER
GO
ALTER DATABASE BigDB
MODIFY FILE
( NAME = BIGDBPPE_log,
FILENAME = "O:\MSSQL\Data\BigDB_log.ldf",
MAXSIZE = UNLIMITED,
FILEGROWTH = 200MB)
GO
© Server Fault or respective owner