Monday, February 20, 2012

Newbee questions

I am trying to execute these set of statements...
CREATE DATABASE Sales1
ON
PRIMARY(NAME=SalesPrimary,
FILENAME='C:\Kim\SalesPrimary.mdf',
SIZE = 500MB,
MAXSIZE = 200,
FILEGROWTH = 20),
FILEGROUP SalesFG
(NAME = SalesData1,
FILENAME = 'C:\Kim\SalesData1.ndf',
SIZE = 200MB,
MAXSIZE = 800,
FILEGROWTH = 100),
(FILENAME='C:\Kim\SalesData2.ndf',
SIZE = 400MB,
MAXSIZE = 1200,
FILEGROWTH = 300),
FILEGROUP SalesHistoryFG
(NAME = SalesHistory1,
FILENAME='C:\Kim\SalesHistory1.ndf',
SIZE=100MB,
MAXSIZE=500,
FILEGROWTH=50)
LOG ON
(NAME=Archlog1,
FILENAME='C:\Kim\SalesLog.ldf',
SIZE=300MB,
MAXSIZE=800,
FILEGROWTH=100)
I am using SSMS and typind this in the New Query Editor window.
But when I execute it...it gives me an error saying...
Msg 1036, Level 16, State 2, Line 1
File option NAME is required in this CREATE/ALTER DATABASE statement.
But I already gave the database name as SALES1...what is the problem
here'
Appreciate your help
Thanks in advance!Just glancing, it looks like the NAME is missing for salesdata2.ndf
No idea if the rest is correct or not...
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"freeblue11" <freeblue11@.gmail.com> wrote in message
news:1164656369.028134.98250@.j72g2000cwa.googlegroups.com...
>I am trying to execute these set of statements...
> CREATE DATABASE Sales1
> ON
> PRIMARY(NAME=SalesPrimary,
> FILENAME='C:\Kim\SalesPrimary.mdf',
> SIZE = 500MB,
> MAXSIZE = 200,
> FILEGROWTH = 20),
> FILEGROUP SalesFG
> (NAME = SalesData1,
> FILENAME = 'C:\Kim\SalesData1.ndf',
> SIZE = 200MB,
> MAXSIZE = 800,
> FILEGROWTH = 100),
> (FILENAME='C:\Kim\SalesData2.ndf',
> SIZE = 400MB,
> MAXSIZE = 1200,
> FILEGROWTH = 300),
> FILEGROUP SalesHistoryFG
> (NAME = SalesHistory1,
> FILENAME='C:\Kim\SalesHistory1.ndf',
> SIZE=100MB,
> MAXSIZE=500,
> FILEGROWTH=50)
> LOG ON
> (NAME=Archlog1,
> FILENAME='C:\Kim\SalesLog.ldf',
> SIZE=300MB,
> MAXSIZE=800,
> FILEGROWTH=100)
> I am using SSMS and typind this in the New Query Editor window.
> But when I execute it...it gives me an error saying...
> Msg 1036, Level 16, State 2, Line 1
> File option NAME is required in this CREATE/ALTER DATABASE statement.
> But I already gave the database name as SALES1...what is the problem
> here'
> Appreciate your help
> Thanks in advance!
>|||Good formatting often makes things so easy to see. Notes inline...
CREATE DATABASE Sales1
ON PRIMARY
( NAME=SalesPrimary,
FILENAME='D:\Temp\SalesPrimary.mdf',
SIZE = 500MB,
MAXSIZE = 500, --Maxsize has to be at least the same as Size
FILEGROWTH = 20
),
FILEGROUP SalesFG
( NAME = SalesData1,
FILENAME = 'D:\Temp\SalesData1.ndf',
SIZE = 200MB,
MAXSIZE = 800,
FILEGROWTH = 100
),
( , --Missing Filename here
FILENAME='D:\Temp\SalesData2.ndf',
SIZE = 400MB,
MAXSIZE = 1200,
FILEGROWTH = 300
),
FILEGROUP SalesHistoryFG
( NAME = SalesHistory1,
FILENAME='D:\Temp\SalesHistory1.ndf',
SIZE=100MB,
MAXSIZE=500,
FILEGROWTH=50
)
LOG ON
( NAME=Archlog1,
FILENAME='D:\Temp\SalesLog.ldf',
SIZE=300MB,
MAXSIZE=800,
FILEGROWTH=100
)
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"freeblue11" <freeblue11@.gmail.com> wrote in message news:1164656369.028134.98250@.j72g2000cw
a.googlegroups.com...
>I am trying to execute these set of statements...
>
> CREATE DATABASE Sales1
> ON
> PRIMARY(NAME=SalesPrimary,
> FILENAME='C:\Kim\SalesPrimary.mdf',
> SIZE = 500MB,
> MAXSIZE = 200,
> FILEGROWTH = 20),
> FILEGROUP SalesFG
> (NAME = SalesData1,
> FILENAME = 'C:\Kim\SalesData1.ndf',
> SIZE = 200MB,
> MAXSIZE = 800,
> FILEGROWTH = 100),
> (FILENAME='C:\Kim\SalesData2.ndf',
> SIZE = 400MB,
> MAXSIZE = 1200,
> FILEGROWTH = 300),
> FILEGROUP SalesHistoryFG
> (NAME = SalesHistory1,
> FILENAME='C:\Kim\SalesHistory1.ndf',
> SIZE=100MB,
> MAXSIZE=500,
> FILEGROWTH=50)
> LOG ON
> (NAME=Archlog1,
> FILENAME='C:\Kim\SalesLog.ldf',
> SIZE=300MB,
> MAXSIZE=800,
> FILEGROWTH=100)
>
> I am using SSMS and typind this in the New Query Editor window.
> But when I execute it...it gives me an error saying...
>
> Msg 1036, Level 16, State 2, Line 1
> File option NAME is required in this CREATE/ALTER DATABASE statement.
> But I already gave the database name as SALES1...what is the problem
> here'
>
> Appreciate your help
>
> Thanks in advance!
>|||Kevin, Arnie
My oversite!!
Thank you very much!
Arnie Rowland wrote:
> Good formatting often makes things so easy to see. Notes inline...
> CREATE DATABASE Sales1
> ON PRIMARY
> ( NAME=SalesPrimary,
> FILENAME='D:\Temp\SalesPrimary.mdf',
> SIZE = 500MB,
> MAXSIZE = 500, --Maxsize has to be at least the same as Size
> FILEGROWTH = 20
> ),
> FILEGROUP SalesFG
> ( NAME = SalesData1,
> FILENAME = 'D:\Temp\SalesData1.ndf',
> SIZE = 200MB,
> MAXSIZE = 800,
> FILEGROWTH = 100
> ),
> ( , --Missing Filename here
> FILENAME='D:\Temp\SalesData2.ndf',
> SIZE = 400MB,
> MAXSIZE = 1200,
> FILEGROWTH = 300
> ),
> FILEGROUP SalesHistoryFG
> ( NAME = SalesHistory1,
> FILENAME='D:\Temp\SalesHistory1.ndf',
> SIZE=100MB,
> MAXSIZE=500,
> FILEGROWTH=50
> )
> LOG ON
> ( NAME=Archlog1,
> FILENAME='D:\Temp\SalesLog.ldf',
> SIZE=300MB,
> MAXSIZE=800,
> FILEGROWTH=100
> )
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to th
e top yourself.
> - H. Norman Schwarzkopf
>
> "freeblue11" <freeblue11@.gmail.com> wrote in message news:1164656369.02813
4.98250@.j72g2000cwa.googlegroups.com...
> --=_NextPart_000_07DC_01C7121B.7A817570
> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 5412
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 6.00.5730.11" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY>
> <DIV><FONT face=Arial size=2>Good formatting often makes things so easy to
see.
> Notes inline...</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face="Courier New" size=2>CREATE DATABASE Sales1<BR> &
amp;nbsp; ON
> PRIMARY<BR> (
> NAME=SalesPrimary,<BR> &a
mp;nbsp;
> FILENAME='D:\Temp\SalesPrimary.mdf',<BR> &
;nbsp;
> SIZE = 500MB,<BR> &nb
sp; MAXSIZE =
> 500, --Maxsize has to be at least the same as
> Size<BR> &n
bsp; FILEGROWTH =
> 20<BR> ),<BR>&
amp;nbsp; FILEGROUP
> SalesFG<BR> (
NAME =
> SalesData1,<BR>  
; FILENAME =
> 'D:\Temp\SalesData1.ndf',<BR> &
nbsp;
> SIZE = 200MB,<BR> &nb
sp; MAXSIZE =
> 800,<BR> &n
bsp; FILEGROWTH =
> 100<BR> ),<BR>
> ( , --Missing Filename
> here<BR> &n
bsp;
> FILENAME='D:\Temp\SalesData2.ndf',<BR> &n
bsp;
> SIZE = 400MB,<BR> &nb
sp; MAXSIZE =
> 1200,<BR> &
nbsp; FILEGROWTH =
> 300<BR> ),<BR>
FILEGROUP
> SalesHistoryFG<BR> (&
;nbsp; NAME =
> SalesHistory1,<BR> &n
bsp;
> FILENAME='D:\Temp\SalesHistory1.ndf',<BR> &am
p;nbsp;
> SIZE=100MB,<BR>  
;
> MAXSIZE=500,<BR> &nbs
p;
> FILEGROWTH=50<BR> )<BR>&
amp;nbsp; LOG
> ON<BR> (
> NAME=Archlog1,<BR> &n
bsp;
> FILENAME='D:\Temp\SalesLog.ldf',<BR> &nbs
p;
> SIZE=300MB,<BR>  
;
> MAXSIZE=800,<BR> &nbs
p;
> FILEGROWTH=100<BR> )</FO
NT></DIV>
> <DIV><FONT face="Courier New" size=2></FONT> </DIV>
> <DIV><BR><FONT face=Arial size=2>-- <BR>Arnie Rowland, Ph.D.<BR>Westwood
> Consulting, Inc</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>Most good judgment comes from experience. <BR
>Most
> experience comes from bad judgment. <BR>- Anonymous</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>You can't help someone get up a hill without
> getting a little closer to the top yourself.<BR>- H. Norman
> Schwarzkopf</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>"freeblue11" <</FONT><A
> href="http://links.10026.com/?link=mailto:freeblue11@.gmail.com"><FONT face=Arial
> size=2>freeblue11@.gmail.com</FONT></A><FONT face=Arial size=2>> wrote i
n
> message </FONT><A
> href="http://links.10026.com/?link=news:1164656369.028134.98250@.j72g2000cwa.googlegroups.com"><FONT
> face=Arial
> size=2>news:1164656369.028134.98250@.j72g2000cwa.googlegroups.com</FONT></A
><FONT
> face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>>I am trying
to
> execute these set of statements...<BR>> <BR>> CREATE DATABASE
> Sales1<BR>> ON<BR>> PRIMARY(NAME=SalesPrimary,<BR>>
> FILENAME='C:\Kim\SalesPrimary.mdf',<BR>> SIZE = 500MB,<BR>> MAXSIZE
=
> 200,<BR>> FILEGROWTH = 20),<BR>> FILEGROUP SalesFG<BR>> (NAME =
> SalesData1,<BR>> FILENAME = 'C:\Kim\SalesData1.ndf',<BR>> SIZE =
> 200MB,<BR>> MAXSIZE = 800,<BR>> FILEGROWTH = 100),<BR>>
> (FILENAME='C:\Kim\SalesData2.ndf',<BR>> SIZE = 400MB,<BR>> MAXSIZE =
> 1200,<BR>> FILEGROWTH = 300),<BR>> FILEGROUP SalesHistoryFG<BR>>
(NAME
> = SalesHistory1,<BR>> FILENAME='C:\Kim\SalesHistory1.ndf',<BR>>
> SIZE=100MB,<BR>> MAXSIZE=500,<BR>> FILEGROWTH=50)<BR>> LOG ON<BR>
> (NAME=Archlog1,<BR>> FILENAME='C:\Kim\SalesLog.ldf',<BR>>
> SIZE=300MB,<BR>> MAXSIZE=800,<BR>> FILEGROWTH=100)<BR>> <BR>>
I am
> using SSMS and typind this in the New Query Editor window.<BR>> But whe
n I
> execute it...it gives me an error saying...<BR>> <BR>> Msg 1036, Lev
el 16,
> State 2, Line 1<BR>> File option NAME is required in this CREATE/ALTER
> DATABASE statement.<BR>> But I already gave the database name as
> SALES1...what is the problem<BR>> here'<BR>> <BR>> Appreciate
your
> help<BR>> <BR>> Thanks in advance!<BR>></FONT></BODY></HTML>
> --=_NextPart_000_07DC_01C7121B.7A817570--

No comments:

Post a Comment