为了防止数据文件和日志文件同时丢失,在创建数据库时为数据库文件生成一个或多个副本,存放在不同磁盘。
create database students
on primary
(
name=students1,
filename='c:\data\students1.mdf',
size=10MB,
filegrowth=10%,
maxsize=UNLIMITED
),
(
name=students2,
filename='e:\data\students2.ndf',
size=10MB,
filegrowth=1MB,
maxsize=75MB
)
log on
(
name=studentlog1,
filename='c:\data\studentlog1.ldf',
maxsize=10MB,
filegrowth=1MB
),
(
name=studentlog2,
filename='e:\data\studentlog2.ldf',
maxsize=10MB,
filegrowth=1MB
)