|
Home > Archive > SQL server exams > May 2002 > Syntax Error??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| cocolocopolo 2002-05-08, 3:08 pm |
| For practise purpose, I tried create database "Test" on Master with TestData on Primary, and TestData1 and TestData2 on FileGroup.
This is what I typed in:
**************
Use Master
Go
Create Database Test
On Primary
(Name='TestData',
Filename='E:\Microsoft SQL Server\MSSQL\Data\Testdata.mdf',
Size=4MB,
Maxsize=20MB,
FileGrowth=2MB)
FileGroup Test
(Name='TestData1',
Filename='E:\Microsoft SQL Server\MSSQL\Data\Testdata1.ndf',
Size=2MB,
Maxsize=10MB,
FileGrowth=1MB)
(Name='TestData2',
Filename='E:\Microsoft SQL Server\MSSQL\Data\TestData2.ndf',
Size=2MB,
Maxsize=10MB,
FileGrowth=1MB)
Log on
(Name='TestLog',
Filename='E:\Microsoft SQL Server\MSSQL\Data\TestLog.ldf',
Size=2MB,
Maxsize=10MB,
FileGrowth=1MB)
Go
****************
But I got:
Server: Msg 170, Level 15, State 1, Line 10
Line 10: Incorrect syntax near 'FileGroup'.
Now, I am puzzled where is the syntax error near 'FileGroup'???
Thank you for advice. | |
| amyland 2002-05-08, 6:32 pm |
| Create Database Test
On Primary
(Name='TestData',
Filename='E:\Microsoft SQL Server\MSSQL\Data\Testdata.mdf',
Size=4MB,
Maxsize=20MB,
FileGrowth=2MB) Here you miss a ","
After you add the ",", it will generate no error. | |
| amyland 2002-05-08, 6:36 pm |
| I forget
also you need a "," between TestData1 block and TestData2 block.
But no "," between the log definition and filegroup definition. | |
| cocolocopolo 2002-05-09, 3:43 am |
| Wow, thanks to amyland.
You really smart.
I tried to "," and it really works.
Thank again. |
|
|
|
|