Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Is it giving any sort of error? –  Satanicpuppy May 17 '10 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 '10 at 22:55
    
Is it SQL express? –  SqlACID May 17 '10 at 23:10
    
SQL Server 2008 Enterprise. –  Ddono25 May 18 '10 at 15:50

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
Not sure what the issue was, but connecting to the SQL Server from the local machine worked without issues. Thank you! –  Ddono25 May 20 '10 at 17:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.