Thursday, May 24, 2007

How to Creating Databases

* Inherit initial properties from model database

* Change to model will affect ALL databases created AFTER the change made.
Note : TempDb is re-Created on each system restart. Might be a good idea for data types that are needed for temp table/objects

* Define logical file names

* Define physical location

* Define auto growth setting

* Create DataBase [junkDb] on Primary
(Name = N'JunkDbData', FileName = N'Physical FileName',
Size = 10, --kb, mb, gb, tb
FileGrowth = 10%, --kb, mb, gb, tb
MaxSize = 15) --kb, mb, gb, tb

Log on
(Name=N'JunkDbLog',
FileName = N'Physical FileName',
Size = 10, --kb, mb, gb, tb
FileGrowth = 10%, --kb, mb, gb, tb
MaxSize = unlimited)

* Default for filegrowth is 10%

* Default for MAXSIZE is Unlimited

No comments: