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.
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.
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.