1

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
4
  • Is it giving any sort of error? May 17, 2010 at 20:39
  • According to SQL Server, syntax isn't correct on fourth line after 'MODIFY FILE' and sites the beginning parentheses as the error.
    – Ddono25
    May 17, 2010 at 22:55
  • Is it SQL express?
    – SqlACID
    May 17, 2010 at 23:10
  • SQL Server 2008 Enterprise.
    – Ddono25
    May 18, 2010 at 15:50

1 Answer 1

1

The syntax looks ok, make sure the database name doesn't need to be [square-bracketed] and that the logical names match.

1
  • Not sure what the issue was, but connecting to the SQL Server from the local machine worked without issues. Thank you!
    – Ddono25
    May 20, 2010 at 17:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .