May 16, 2013 at 5:18 am
I am getting a syntax error when trying to create a database. Here is my code:
Create database ToddTestDB On Primary
( Name = N'ToddTestDB',
FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\
ToddTestDB.MDF' , Size = 3072KB
MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'ToddTestDB_log',
FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\
ToddTestDB_log.ldf' ,
SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%
COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
GO
Everything looks fine to me but it says:
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near 'MAXSIZE'.
May 16, 2013 at 5:26 am
missing comma I think, try this:
Create database ToddTestDB On Primary
( Name = N'ToddTestDB',
FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATAToddTestDB.MDF' , Size = 3072KB, -- this was missing!
MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'ToddTestDB_log',
FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATAToddTestDB_log.ldf' ,
SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%
COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
GO
---------------------------------------------------------
It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens[/url]
Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn
May 16, 2013 at 5:30 am
Missing a comma and also a closing parenthesis on the log:
changing the layout for readability was what made me see it:
Create database ToddTestDB On Primary
( Name = N'ToddTestDB',
FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ToddTestDB.MDF' ,
Size = 3072KB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 1024KB )
LOG ON
( NAME = N'ToddTestDB_log',
FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ToddTestDB_log.ldf' ,
SIZE = 1024KB ,
MAXSIZE = 2048GB ,
FILEGROWTH = 10%)
COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
GO
Lowell
May 16, 2013 at 5:36 am
ah.... thx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply