Friday, March 30, 2012
Newbie question on dbo permission
I have a sql account in a shared hosting server and my account is able
to execute scripts to create [dbo].* tables and [dbo].* store
procedures.
however, after they are created, if I tried to execute them, I get for
example,
permission denied on object 'GetUserDataByEmail', database 'mypm',
owner 'dbo'.
so after googling around, I found out I had to do
GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
then i could execute it.
so i have these questions
1. I always thought in order to be able to create [dbo].* tables, you
need to a dbo?
2. If I'm right with #1, then how come my user can't excute
[dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
access to it?
3. I see in another person's code, it had "GRANT EXECUTE on
dbo.GetUserDataByEmail to public, what does public mean? anybody can
execute it? if so, then what's the point of setting [dbo] to it?
Really appreicate your 2 cents on this. Thanks
"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegro ups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Is this SQL 2000 or 2005?
David
|||Hi
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
You will have to be a member of sysadmin server role or db_owner database
role.
DBO is just a privileged user.
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
If you memeber of syadmin server role or db_owner database role you don't
need EXECUTE permission
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
Public means that every user can execute the sp , do you really want it
:-)))?
"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegro ups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Newbie question on dbo permission
I have a sql account in a shared hosting server and my account is able
to execute scripts to create [dbo].* tables and [dbo].* store
procedures.
however, after they are created, if I tried to execute them, I get for
example,
permission denied on object 'GetUserDataByEmail', database 'mypm',
owner 'dbo'.
so after googling around, I found out I had to do
GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
then i could execute it.
so i have these questions
1. I always thought in order to be able to create [dbo].* tables, you
need to a dbo?
2. If I'm right with #1, then how come my user can't excute
[dbo].[GetUserDataByEmail], instead I had to explicilty grant execut
e
access to it?
3. I see in another person's code, it had "GRANT EXECUTE on
dbo.GetUserDataByEmail to public, what does public mean? anybody can
execute it? if so, then what's the point of setting [dbo] to it?
Really appreicate your 2 cents on this. Thanks"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegroups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant exec
ute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Is this SQL 2000 or 2005?
David|||Hi
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
You will have to be a member of sysadmin server role or db_owner database
role.
DBO is just a privileged user.
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant exec
ute
> access to it?
If you memeber of syadmin server role or db_owner database role you don't
need EXECUTE permission
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
Public means that every user can execute the sp , do you really want it
:-)))?
"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegroups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant exec
ute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Newbie question on dbo permission
I have a sql account in a shared hosting server and my account is able
to execute scripts to create [dbo].* tables and [dbo].* store
procedures.
however, after they are created, if I tried to execute them, I get for
example,
permission denied on object 'GetUserDataByEmail', database 'mypm',
owner 'dbo'.
so after googling around, I found out I had to do
GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
then i could execute it.
so i have these questions
1. I always thought in order to be able to create [dbo].* tables, you
need to a dbo?
2. If I'm right with #1, then how come my user can't excute
[dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
access to it?
3. I see in another person's code, it had "GRANT EXECUTE on
dbo.GetUserDataByEmail to public, what does public mean? anybody can
execute it? if so, then what's the point of setting [dbo] to it?
Really appreicate your 2 cents on this. Thanks"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegroups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Is this SQL 2000 or 2005?
David|||Hi
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
You will have to be a member of sysadmin server role or db_owner database
role.
DBO is just a privileged user.
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
If you memeber of syadmin server role or db_owner database role you don't
need EXECUTE permission
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
Public means that every user can execute the sp , do you really want it
:-)))?
"Liming" <lmxudotnet@.gmail.com> wrote in message
news:1168466707.519839.206840@.77g2000hsv.googlegroups.com...
> Hi all,
> I have a sql account in a shared hosting server and my account is able
> to execute scripts to create [dbo].* tables and [dbo].* store
> procedures.
> however, after they are created, if I tried to execute them, I get for
> example,
> permission denied on object 'GetUserDataByEmail', database 'mypm',
> owner 'dbo'.
> so after googling around, I found out I had to do
> GRANT EXECUTE ON [dbo].[GetUserDataByEmail] TO 'myuser'
> then i could execute it.
> so i have these questions
> 1. I always thought in order to be able to create [dbo].* tables, you
> need to a dbo?
> 2. If I'm right with #1, then how come my user can't excute
> [dbo].[GetUserDataByEmail], instead I had to explicilty grant execute
> access to it?
> 3. I see in another person's code, it had "GRANT EXECUTE on
> dbo.GetUserDataByEmail to public, what does public mean? anybody can
> execute it? if so, then what's the point of setting [dbo] to it?
> Really appreicate your 2 cents on this. Thanks
>
Wednesday, March 28, 2012
Newbie question activex transform
This may be incredibly stupid question but how do you execute a sql
statement from within a dts transform data task.
I'm transfering data from one table to another one on the same
database on sqlserver 2000. Most of the rows are copy columns but some
require some manipulations done on them so I'm using activex tasks to
do it.
I have to filter on a part number. There can be more than one row in
the source table with the same part number and I need to select the
earliest date field from the table for that part number.
"select min(first_date_time) from table_name where [part number] = '"
& DTSSource("part Number") & "'"
This is the sql statement i use. It gets parsed correctly and the part
number gets correctly assigned into the statement.
However I have no idea how to execute the statement inside the activex
script and assign the value returned to a variable name to be used
later in the script.
Can someone enlighten me on if it can be done and if not how I amy
achieve a result by other means if it can't
Thanks.It's ok, I discovered what lookup queries are :)
On Sat, 06 Sep 2003 14:54:04 +0100, Mirth1314 <not@.ahope.net> wrote:
>Hi,
>This may be incredibly stupid question but how do you execute a sql
>statement from within a dts transform data task.
>I'm transfering data from one table to another one on the same
>database on sqlserver 2000. Most of the rows are copy columns but some
>require some manipulations done on them so I'm using activex tasks to
>do it.
>I have to filter on a part number. There can be more than one row in
>the source table with the same part number and I need to select the
>earliest date field from the table for that part number.
>"select min(first_date_time) from table_name where [part number] = '"
>& DTSSource("part Number") & "'"
>This is the sql statement i use. It gets parsed correctly and the part
>number gets correctly assigned into the statement.
>However I have no idea how to execute the statement inside the activex
>script and assign the value returned to a variable name to be used
>later in the script.
>Can someone enlighten me on if it can be done and if not how I amy
>achieve a result by other means if it can't
>Thanks.
Monday, March 26, 2012
Newbie question - how do I specify a variable for the file location when using the Execute Packa
There are two options to specify the subpackage location (SQL Server or file location). I'd like to know how I can specify a variable name that points to the file location so I avoid hard coding the file location which could change during production installation.
thanks
http://sqljunkies.com/WebLog/knight_reign/archive/2005/11/12/17375.aspx
Thanks,
K|||
To do this you must work on the file connection manager not on the task.
You go and add a property expression to Expression colection of the CM that would map your variable to the ConnectionString property of the CM.
Thanks,
Ovidiu
Hi, I'm another newbie.
Can you give a short example of how to do that?
Thanks,
Roger
|||Hi Ovidu,
Thanks for the reply. Yes, I am working in the connection manager. The problem I'm having is getting the connectionstring property to recognize a string variable. I've played with it a lot and the only syntx that I've tried that doesn't cause an error on entry is @.MyVariable. but, when I run the package, it is interpreted as a file name, which it doesn't find.
Tha variable is in scope. When I substitute a script task with a msgbox, I can step through the files. Can you show me a short example of how you'd do it?
Thanks, again,
Roger
Newbie question - how do I specify a variable for the file location when using the Execute Packa
There are two options to specify the subpackage location (SQL Server or file location). I'd like to know how I can specify a variable name that points to the file location so I avoid hard coding the file location which could change during production installation.
thanks
http://sqljunkies.com/WebLog/knight_reign/archive/2005/11/12/17375.aspx
Thanks,
K|||
To do this you must work on the file connection manager not on the task.
You go and add a property expression to Expression colection of the CM that would map your variable to the ConnectionString property of the CM.
Thanks,
Ovidiu
Hi, I'm another newbie.
Can you give a short example of how to do that?
Thanks,
Roger
|||Hi Ovidu,
Thanks for the reply. Yes, I am working in the connection manager. The problem I'm having is getting the connectionstring property to recognize a string variable. I've played with it a lot and the only syntx that I've tried that doesn't cause an error on entry is @.MyVariable. but, when I run the package, it is interpreted as a file name, which it doesn't find.
Tha variable is in scope. When I substitute a script task with a msgbox, I can step through the files. Can you show me a short example of how you'd do it?
Thanks, again,
Roger
sqlMonday, February 20, 2012
Newbee questions
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.googlegro ups.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 the top yourself.
> - H. Norman Schwarzkopf
>
> "freeblue11" <freeblue11@.gmail.com> wrote in message news:1164656369.028134.98250@.j72g2000cwa.googlegro ups.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> ON
> PRIMARY<BR>   ; (
> NAME=SalesPrimary,<BR> &nbs p; &nbs p;
> FILENAME='D:\Temp\SalesPrimary.mdf',<BR>
> SIZE = 500MB,<BR> MAXSIZE =
> 500, --Maxsize has to be at least the same as
> Size<BR> &a mp;nbsp; FILEGROWTH =
> 20<BR> & ;nbsp; ),<BR> FILEGROUP
> SalesFG<BR>   ; ( NAME =
> SalesData1,<BR> & nbsp; FILENAME =
> 'D:\Temp\SalesData1.ndf',<BR> & amp;nbsp; & amp;nbsp;
> SIZE = 200MB,<BR> MAXSIZE =
> 800,<BR> &a mp;nbsp; FILEGROWTH =
> 100<BR> &am p;nbsp; ),<BR> & ;nbsp;
> ( , --Missing Filename
> here<BR> &a mp;nbsp;
> FILENAME='D:\Temp\SalesData2.ndf',<BR> &a mp;nbsp; &a mp;nbsp;
> SIZE = 400MB,<BR> MAXSIZE =
> 1200,<BR> & amp;nbsp; FILEGROWTH =
> 300<BR> &am p;nbsp; ),<BR> FILEGROUP
> SalesHistoryFG<BR> &a mp;nbsp; ( NAME =
> SalesHistory1,<BR> &a mp;nbsp;
> FILENAME='D:\Temp\SalesHistory1.ndf',<BR>  ;   ;
> SIZE=100MB,<BR> & nbsp;
> MAXSIZE=500,<BR> & ;nbsp;
> FILEGROWTH=50<BR> &am p;nbsp; )<BR> LOG
> ON<BR> & ;nbsp; (
> NAME=Archlog1,<BR> &a mp;nbsp;
> FILENAME='D:\Temp\SalesLog.ldf',<BR> & ;nbsp; & ;nbsp;
> SIZE=300MB,<BR> & nbsp;
> MAXSIZE=800,<BR> & ;nbsp;
> FILEGROWTH=100<BR> &a mp;nbsp; )</FONT></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 in
> message </FONT><A
> href="http://links.10026.com/?link=news:1164656369.028134.98250@.j72g2000cwa.goo glegroups.com"><FONT
> face=Arial
> size=2>news:1164656369.028134.98250@.j72g2000cwa.go oglegroups.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 when I
> execute it...it gives me an error saying...<BR>> <BR>> Msg 1036, Level 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--
Newbee questions
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--
Newbee questions
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!
>|||This is a multi-part message in MIME format.
--=_NextPart_000_07DC_01C7121B.7A817570
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Good formatting often makes things so easy to see. Notes inline...
CREATE DATABASE Sales1
ON PRIMARY
( NAME=3DSalesPrimary,
FILENAME=3D'D:\Temp\SalesPrimary.mdf',
SIZE =3D 500MB,
MAXSIZE =3D 500, --Maxsize has to be at least the same as Size
FILEGROWTH =3D 20
),
FILEGROUP SalesFG
( NAME =3D SalesData1,
FILENAME =3D 'D:\Temp\SalesData1.ndf',
SIZE =3D 200MB,
MAXSIZE =3D 800,
FILEGROWTH =3D 100
),
( , --Missing Filename here
FILENAME=3D'D:\Temp\SalesData2.ndf',
SIZE =3D 400MB,
MAXSIZE =3D 1200,
FILEGROWTH =3D 300
),
FILEGROUP SalesHistoryFG
( NAME =3D SalesHistory1,
FILENAME=3D'D:\Temp\SalesHistory1.ndf',
SIZE=3D100MB,
MAXSIZE=3D500,
FILEGROWTH=3D50
)
LOG ON
( NAME=3DArchlog1,
FILENAME=3D'D:\Temp\SalesLog.ldf',
SIZE=3D300MB,
MAXSIZE=3D800,
FILEGROWTH=3D100
)
-- 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@.j72g2000cwa.googlegroups.com...
>I am trying to execute these set of statements...
> > CREATE DATABASE Sales1
> ON
> PRIMARY(NAME=3DSalesPrimary,
> FILENAME=3D'C:\Kim\SalesPrimary.mdf',
> SIZE =3D 500MB,
> MAXSIZE =3D 200,
> FILEGROWTH =3D 20),
> FILEGROUP SalesFG
> (NAME =3D SalesData1,
> FILENAME =3D 'C:\Kim\SalesData1.ndf',
> SIZE =3D 200MB,
> MAXSIZE =3D 800,
> FILEGROWTH =3D 100),
> (FILENAME=3D'C:\Kim\SalesData2.ndf',
> SIZE =3D 400MB,
> MAXSIZE =3D 1200,
> FILEGROWTH =3D 300),
> FILEGROUP SalesHistoryFG
> (NAME =3D SalesHistory1,
> FILENAME=3D'C:\Kim\SalesHistory1.ndf',
> SIZE=3D100MB,
> MAXSIZE=3D500,
> FILEGROWTH=3D50)
> LOG ON
> (NAME=3DArchlog1,
> FILENAME=3D'C:\Kim\SalesLog.ldf',
> SIZE=3D300MB,
> MAXSIZE=3D800,
> FILEGROWTH=3D100)
> > 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!
>
--=_NextPart_000_07DC_01C7121B.7A817570
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Good formatting often makes things so =easy to see. Notes inline...
CREATE DATABASE =Sales1 ON PRIMARY ( NAME=3DSalesPrimary, =FILENAME=3D'D:\Temp\SalesPrimary.mdf', &=nbsp; SIZE =3D 500MB, =MAXSIZE =3D 500, --Maxsize has to be at least the same as Size FILEGROWTH =3D 20 ), FILEGROUP SalesFG ( NAME =3D SalesData1, FILENAME ==3D 'D:\Temp\SalesData1.ndf', &n=bsp; SIZE =3D 200MB, =MAXSIZE =3D 800, FILEGROWTH =3D 100 =), ( , --Missing Filename here FILENAME=3D'D:\Temp\SalesData2.ndf', &nb=sp; SIZE =3D 400MB, =MAXSIZE =3D 1200, FILEGROWTH =3D =300 ), FILEGROUP SalesHistoryFG ( NAME =3D SalesHistory1, FILENAME=3D'D:\Temp\SalesHistory1.ndf', = SIZE=3D100MB, MAXSIZE=3D500, FILEGROWTH=3D50 ) LOG ON ( NAME=3DArchlog1, FILENAME=3D'D:\Temp\SalesLog.ldf',  =; SIZE=3D300MB, MAXSIZE=3D800, FILEGROWTH=3D100 )
-- 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"
--=_NextPart_000_07DC_01C7121B.7A817570--|||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 the top yourself.
> - H. Norman Schwarzkopf
>
> "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!
> >
> --=_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">
> &
>
>
>
>
>
> 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" < href="http://links.10026.com/?link=mailto:freeblue11@.gmail.com"> size=2>freeblue11@.gmail.com> wrote in
> message href="http://links.10026.com/?link=news:1164656369.028134.98250@.j72g2000cwa.googlegroups.com"> face=Arial
> size=2>news:1164656369.028134.98250@.j72g2000cwa.googlegroups.com face=Arial size=2>...>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!>
> --=_NextPart_000_07DC_01C7121B.7A817570--