--创建数据库
USE master
go
CREATE DATABASE databasename
ON
( NAME = databasename_dat,
FILENAME = 'e:/program files/microsoft sql server/mssql/data/databasename.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON -- 日志文件
( NAME = 'databasename_log',
FILENAME = 'e:/program files/microsoft sql server/mssql/data/databasename.ldf',
SIZE = 2MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )