Create database by setting the mdf file, size, maxsize and file growth rate : Create Database « Database « SQL Server / T-SQL






Create database by setting the mdf file, size, maxsize and file growth rate



1> CREATE DATABASE Database_2
2> ON PRIMARY
3> (NAME = Database_2_dat,
4>     FILENAME = 'c:\dat.mdf',
5>     SIZE = 2MB,
6>     MAXSIZE = 20,
7>     FILEGROWTH = 10%)
8> LOG ON
9> (NAME = Database_2_log,
10>     FILENAME = 'c:\log.ldf',
11>     SIZE = 4MB,
12>     MAXSIZE = 10MB,
13>     FILEGROWTH = 20%)
14> GO
1>
2> -- EXEC sp_helpdb Database_2
3> GO
1> DROP DATABASE Database_2
2> GO
1>
           
       








Related examples in the same category

1.Create database from mdf file
2.Create a database: simplest statement