Creating database: T-SQL Command:
1. Open Query Analyzer
2. SELECT master database from the database drop down or issue USE MASTER command and execute
3. Type the following command and press F5 to execute:
CREATE DATABASE MyDB
(
NAME = MyDB_Data, FILENAME = 'E: \DATA\MyDB_data.mdf', SIZE = 100MB, FILEGROWTH = 25MB
)
LOG ON
(
NAME = MyDB_Log, FILENAME = 'E: \DATA\MyDB_log.ldf', SIZE = 50MB, FILEGROWTH = 15MB
)
-- Verify the database files
SELECT name, size, size*1.0/128 AS [Size in MBs] FROM sysfiles
No comments:
Post a Comment