Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Create database error.

Author  Topic 

Hinduson
Yak Posting Veteran

69 Posts

Posted - 2014-11-25 : 09:15:16
Below is the script i typed and i keep having this error message that is not allowing me to create a new database.

Create Database EMPLOYEE
ON
( NAME = employee_dat,
FILENAME = 'C:\Program files\Microsoft sql
server\MSSQL.1\MSSQL\Data\Employee_data.mdf',
SIZE = 10,
MAXSIZE = 50
FILEGROWTH = 5)
LOG ON
(NAME = Employee_log,
Filename = 'C:\Program files\Microsoft sql
server\MSSQL.1\MSSQL\Data\Employee_log.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB)
GO

ERROR MESSAGE
Msg 153, Level 15, State 1, Line 8
Invalid usage of the option FILEGROWTH in the CREATE/ALTER DATABASE statement.

Please can someone help me rectify this problem?

Best Regards.

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-11-25 : 09:29:42
missing comma after "MAXSIZE = 50"
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2014-11-30 : 02:24:16
Before you execute the query , you can also hit the Parse button , which validates the syntax. It doesn't check for the underlying objects

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -