none
error mesage when I am excersising to create database partitiontable in exam book 70/432 of sql2008 RRS feed

  • Question

  • hello,

    I am trying to do the excersise in the book of exam 70-432 and I am executing this code

    USE master
    GO
    CREATE DATABASE partitiontest
    ON PRIMARY
    (NAME=primary_data, FILENAME='C:\test\db.mdf',SIZE=2MB),
    FILEGROUP FG1
    (NAME=FG1_data, FILENAME='C:\test\FG1.ndf',SIZE=2MB),
    FILEGROUP FG2
    (NAME=FG2_data, FILENAME='C:\test\FG2.ndf',SIZE=2MB),
    FILEGROUP FG3
    (NAME=FG3_data, FILENAME='C:\test\FG3.ndf',SIZE=2MB),
    FILEGROUP FG4
    (NAME=FG4_data, FILENAME='C:\test\FG4.ndf',SIZE=2MB),
    FILEGROUP FG5
    (NAME=FG5_data, FILENAME='C:\test\FG5.ndf',SIZE=2MB),

    FILEGROUP FG6
    (NAME=FG6_data, FILENAME='C:\test\FG6.ndf',SIZE=2MB),
    FILEGROUP FG7
    (NAME=FG7_data, FILENAME='C:\test\FG7.ndf',SIZE=2MB),
    FILEGROUP FG8
    (NAME=FG8_data, FILENAME='C:\test\FG8.ndf',SIZE=2MB),
    FILEGROUP FG9
    (NAME=FG9_data, FILENAME='C:\test\FG9.ndf',SIZE=2MB),
    FILEGROUP FG10
    (NAME=FG10_data, FILENAME='C:\test\FG10.ndf',SIZE=2MB),
    FILEGROUP FG11
    (NAME=FG11_data, FILENAME='C:\test\FG11.ndf',SIZE=2MB),
    FILEGROUP FG12
    (NAME=FG12_data, FILENAME='C:\test\FG12.ndf',SIZE=2MB),
    FILEGROUP FG13
    (NAME=FG13_data, FILENAME='C:\test\FG13.ndf',SIZE=2MB),

    LOG ON

    (NAME=db_log, FILENAME='C:\test\log_ldf' ,SIZE=2MB, FILEGROWTH=10%);
    GO
    USE partitiontest
    GO

    and I am getting an error that near LOG is incorrect syntax is.and that that partitiontest it doesn't exist or incorrect name is.

    I tried everythig to solve the problem but I couldn't succeed. I looked in the book of exam that LOG ON syntax is correct,but I don't understand why he is still giving me incorrect syntax.and I don't understand why the message telling me that partitiontest it doesn't exist.because I looked on C partition and the test folder it does well exist.

    can somebody give me some advise

    thanks

    johan














    h.david
    Saturday, August 13, 2011 1:00 PM

Answers

  • Error : Msg 1803, Level 16, State 1, Line 1
    The CREATE DATABASE statement failed. The primary file must be at least 50 MB to accommodate a copy of the model database.

    This error may change depending on the size of your Model database.  Either way, just set the primary file size to the value returned by the error.


    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    MC ID: Microsoft Transcript

    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
    Sunday, August 14, 2011 2:55 AM
    Moderator
  • Hi

     

    Use This below Syntax

     

    USE master
    GO
    CREATE DATABASE partitiontest
    ON PRIMARY
    (NAME=primary_data, FILENAME='C:\test\db.mdf',SIZE=2MB),
    FILEGROUP FG1
    (NAME=FG1_data, FILENAME='C:\test\FG1.ndf',SIZE=2MB),
    FILEGROUP FG2 
    (NAME=FG2_data, FILENAME='C:\test\FG2.ndf',SIZE=2MB),
    FILEGROUP FG3
    (NAME=FG3_data, FILENAME='C:\test\FG3.ndf',SIZE=2MB), 
    FILEGROUP FG4
    (NAME=FG4_data, FILENAME='C:\test\FG4.ndf',SIZE=2MB),
    FILEGROUP FG5 
    (NAME=FG5_data, FILENAME='C:\test\FG5.ndf',SIZE=2MB), 
    
    FILEGROUP FG6
    (NAME=FG6_data, FILENAME='C:\test\FG6.ndf',SIZE=2MB), 
    FILEGROUP FG7
    (NAME=FG7_data, FILENAME='C:\test\FG7.ndf',SIZE=2MB), 
    FILEGROUP FG8
    (NAME=FG8_data, FILENAME='C:\test\FG8.ndf',SIZE=2MB), 
    FILEGROUP FG9
    (NAME=FG9_data, FILENAME='C:\test\FG9.ndf',SIZE=2MB), 
    FILEGROUP FG10
    (NAME=FG10_data, FILENAME='C:\test\FG10.ndf',SIZE=2MB),
    FILEGROUP FG11
    (NAME=FG11_data, FILENAME='C:\test\FG11.ndf',SIZE=2MB),
    FILEGROUP FG12
    (NAME=FG12_data, FILENAME='C:\test\FG12.ndf',SIZE=2MB),
    FILEGROUP FG13
    (NAME=FG13_data, FILENAME='C:\test\FG13.ndf',SIZE=2MB)
    
    LOG ON 
    
    (NAME=db_log, FILENAME='C:\test\log_ldf' ,SIZE=2MB, FILEGROWTH=10%);
    GO


    It may fail with  

    Error : Msg 1803, Level 16, State 1, Line 1
    The CREATE DATABASE statement failed. The primary file must be at least 50 MB to accommodate a copy of the model database.


    Change the Primary File to 50MB

    CREATE DATABASE partitiontest
    ON PRIMARY
    (NAME=primary_data, FILENAME='C:\test\db.mdf',SIZE=50MB),
    FILEGROUP FG1
    .

    .

    .

     


    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::
    Saturday, August 13, 2011 6:24 PM

All replies

  • Hi

     

    Use This below Syntax

     

    USE master
    GO
    CREATE DATABASE partitiontest
    ON PRIMARY
    (NAME=primary_data, FILENAME='C:\test\db.mdf',SIZE=2MB),
    FILEGROUP FG1
    (NAME=FG1_data, FILENAME='C:\test\FG1.ndf',SIZE=2MB),
    FILEGROUP FG2 
    (NAME=FG2_data, FILENAME='C:\test\FG2.ndf',SIZE=2MB),
    FILEGROUP FG3
    (NAME=FG3_data, FILENAME='C:\test\FG3.ndf',SIZE=2MB), 
    FILEGROUP FG4
    (NAME=FG4_data, FILENAME='C:\test\FG4.ndf',SIZE=2MB),
    FILEGROUP FG5 
    (NAME=FG5_data, FILENAME='C:\test\FG5.ndf',SIZE=2MB), 
    
    FILEGROUP FG6
    (NAME=FG6_data, FILENAME='C:\test\FG6.ndf',SIZE=2MB), 
    FILEGROUP FG7
    (NAME=FG7_data, FILENAME='C:\test\FG7.ndf',SIZE=2MB), 
    FILEGROUP FG8
    (NAME=FG8_data, FILENAME='C:\test\FG8.ndf',SIZE=2MB), 
    FILEGROUP FG9
    (NAME=FG9_data, FILENAME='C:\test\FG9.ndf',SIZE=2MB), 
    FILEGROUP FG10
    (NAME=FG10_data, FILENAME='C:\test\FG10.ndf',SIZE=2MB),
    FILEGROUP FG11
    (NAME=FG11_data, FILENAME='C:\test\FG11.ndf',SIZE=2MB),
    FILEGROUP FG12
    (NAME=FG12_data, FILENAME='C:\test\FG12.ndf',SIZE=2MB),
    FILEGROUP FG13
    (NAME=FG13_data, FILENAME='C:\test\FG13.ndf',SIZE=2MB)
    
    LOG ON 
    
    (NAME=db_log, FILENAME='C:\test\log_ldf' ,SIZE=2MB, FILEGROWTH=10%);
    GO


    It may fail with  

    Error : Msg 1803, Level 16, State 1, Line 1
    The CREATE DATABASE statement failed. The primary file must be at least 50 MB to accommodate a copy of the model database.


    Change the Primary File to 50MB

    CREATE DATABASE partitiontest
    ON PRIMARY
    (NAME=primary_data, FILENAME='C:\test\db.mdf',SIZE=50MB),
    FILEGROUP FG1
    .

    .

    .

     


    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::
    Saturday, August 13, 2011 6:24 PM
  • Error : Msg 1803, Level 16, State 1, Line 1
    The CREATE DATABASE statement failed. The primary file must be at least 50 MB to accommodate a copy of the model database.

    This error may change depending on the size of your Model database.  Either way, just set the primary file size to the value returned by the error.


    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    MC ID: Microsoft Transcript

    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
    Sunday, August 14, 2011 2:55 AM
    Moderator
  •  

    I missed it thanks jeff


    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::
    Sunday, August 14, 2011 8:57 AM