tags:

views:

47

answers:

1

I was asked to create an MS SQL script that will create a database and reserve a 50 MB free disk space? How can I do that and what are the commands to use?

Thanks.

+1  A: 

I think the following is what you are looking for.

CREATE DATABASE TestDB 
    ON
    (
     FILENAME = 'c:\myDB.mdf',
     SIZE = 50MB,
        MAXSIZE = UNLIMITED,
        FILEGROWTH = 5MB
    )
LOG 
ON
    ( 
     NAME = 'TestDB_log',
        FILENAME = 'c:\myDB.ldf',
        SIZE = 1MB,
        MAXSIZE = UNLIMITED,
        FILEGROWTH = 5MB 
    )

Also look at the MSDN link.

Arkain
Thanks for the link and the answer.
Roy Marco Aruta