why an invalid usage of the option filesize in the CREATE/ALTER DATABASE statement ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santhanalakshmi
    New Member
    • May 2009
    • 147

    why an invalid usage of the option filesize in the CREATE/ALTER DATABASE statement ?

    Hi,

    why creating a file group in SQL 2008

    Code:
    [B]if exists (select name from sys.databases where name='testdb')
    drop database testdb
    go
    
    create database testdb on primary
    (name='file1',
    filename='c:\san\primary\file1.mdf',
    size=10mb,
    maxsize=50mb,
    filegrowth=10mb),
    filegroup FG1 
    (name='file2',
    filename='c:\san\secondary\file2.ndf',
    size=1mb,
    [B]maxsize=25mb,[/B]filegrowth=1mb),
    filegroup FG2
    (name='file3',
    filename='c:\san\secondary\file3.ndf',
    size=10mb,
    filesize=100mb,
    filegrowth=10mb),
    filegroup FG3
    (name='file4',
    filename='c:\san\secondary\file4.ndf',
    size=10mb,
    filesize=100mb,
    filegrowth=10mb)
    go[/B]

    Error:Msg 153, Level 15, State 1, Line 18
    Invalid usage of the option filesize in the CREATE/ALTER DATABASE statement.



    Thanks in advance
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    I don't think FILESIZE is a valid option in CREATE DATABASE command.

    Happy Coding!!!

    ~~ CK

    Comment

    Working...