Trouble running Microsoft SQL Server 2005 Training Kit lesson

  • I am trying to figure out why the practice script wont complete. I am executing the following script thru the SSMS in SQLCMD mode and receive the following error:

    Msg 102, Level 15, State 1, Line 26 Incorrect syntax near 'LOG'.

    This is the script from the book that I have entered line for line:

    CREATE DATABASE Projects

    ON

    PRIMARY

    ( NAME = ProjectPrimary,

    FILENAME = 'E:\Projects_Data\ProjectPrimary.mdf',

    SIZE = 100MB,

    MAXSIZE = 200,

    FILEGROWTH = 20),

    FILEGROUP ProjectsFC

    ( NAME = ProjectData1,

    FILENAME = 'F:\Projects_Data\ProjectData1.ndf',

    SIZE = 200MB,

    MAXSIZE = 1200,

    FILEGROWTH = 100),

    ( NAME = ProjectData2,

    FILENAME = 'F:\Projects_Data\ProjectData2.ndf',

    SIZE = 200MB,

    MAXSIZE = 1200,

    FILEGROWTH = 100),

    FILEGROUP ProjectHistoryFG

    ( NAME = ProjectHistory1,

    FILENAME = 'F:\Projects_Data\ProjectHistory1.ndf',

    SIZE = 100MB,

    MAXSIZE = 500,

    FILEGROWTH = 50),

    LOG ON

    ( NAME = Achlog1,

    FILENAME = 'G:\Projects_Data\ProjectLog.ldf',

    SIZE = 300MB,

    MAXSIZE = 800,

    FILEGROWTH = 100)

    The error seems to be at the "LOG ON" clause but, I am a newbie so I am stuck.

    Any help is appriciated.

  • While I didn't test this, so there may be other issues, lose the comma on the line before the LOG ON line.

  • That did the trick...Thank you

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply