这是我学习sqlserver2008的学习过程和笔记,以此来记录我的成长。
建立数据库
CREATE DATABASE [students] ON PRIMARY
( NAME = N'students1', FILENAME = N'E:\add\students1.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%),
( NAME = N'students2', FILENAME = N'E:\add\students2.ndf' , SIZE = 10240KB , MAXSIZE = 30720KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'studentslog1', FILENAME = N'E:\add\studentslog1.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%),
( NAME = N'studentslog2', FILENAME = N'E:\add\studentslog2.ldf' , SIZE = 5120KB , MAXSIZE = 30720KB , FILEGROWTH = 1024KB )
COLLATE Chinese_PRC_CI_AS
这是同一库下建立多个数据库文件和日志文件的格式
建立数据库
CREATE DATABASE [students] ON PRIMARY
( NAME = N'students1', FILENAME = N'E:\add\students1.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%),
( NAME = N'students2', FILENAME = N'E:\add\students2.ndf' , SIZE = 10240KB , MAXSIZE = 30720KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'studentslog1', FILENAME = N'E:\add\studentslog1.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%),
( NAME = N'studentslog2', FILENAME = N'E:\add\studentslog2.ldf' , SIZE = 5120KB , MAXSIZE = 30720KB , FILEGROWTH = 1024KB )
COLLATE Chinese_PRC_CI_AS
这是同一库下建立多个数据库文件和日志文件的格式