Created
September 28, 2010 21:01
-
-
Save rponte/601769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create a custom database on SQLSERVER2005 | |
CREATE DATABASE MyDb ON PRIMARY | |
(NAME = MyDb_Data, | |
FILENAME = 'C:\SQLServerData\Data\MyDb_Data.mdf', | |
SIZE = 250MB, MAXSIZE = UNLIMITED, FILEGROWTH = 5%) | |
LOG ON (NAME = MyDb_Log, | |
FILENAME = 'C:\SQLServerData\Log\MyDb_Log.ldf', | |
SIZE = 50MB, | |
MAXSIZE = 200MB, | |
FILEGROWTH = 5%); | |
-- check database files | |
use MyDb; | |
select file_id, name, | |
physical_name, | |
size*1.0/128 as [size in mbs], | |
max_size, | |
max_size*1.0/128 as [max_size in mbs], | |
growth, | |
growth*1.0/128 as [growth in mbs], | |
is_percent_growth | |
from sys.database_files; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment