SQL Server學習筆記1:如何使用軟件以及創建第一個數據庫

軟件的使用:
這裏寫圖片描述

這裏寫圖片描述

創建第一個數據庫:
例:創建一個student數據庫,其中主文件包含主要數據文件student1_dat 和次要數據文件 student2_dat。有兩個次要文件組:studentGroup1包含2個次要數據文件student1Fi1_dat和studentFi2_dat。studentGroup2包含studentFi1_dat和studentFi2_dat兩個次要數據文件。日誌的邏輯文件名爲student_log

create database student 
on primary
(name=student1_dat,filename="G:\sql2010\mssql\data\student1_dat.mdf",size=10,maxsize=50,filegrowth=15%),
(name=student2_dat,filename="G:\sql2010\mssql\data\student2_dat.ndf",size=10,maxsize=50,filegrowth=15%),
filegroup studentgroup1
(name=student1fi1_dat,filename="G:\sql2010\mssql\data\student1fildt.ndf",size=10,maxsize=50,filegrowth=5),
(name=student1fi2_dat,filename="G:\sql2010\mssql\data\student2fildt.ndf",size=10,maxsize=50,filegrowth=5),
filegroup studentgroup2
(name=student2fi1_dat,filename="G:\sql2010\mssql\data\sg1fildt.ndf",size=10,maxsize=50,filegrowth=5),
(name=student2fi2_dat,filename="G:\sql2010\mssql\data\sg2fildt.ndf",size=10,maxsize=50,filegrowth=5)
LOG ON
(name=student_log,filename="G:\sql2010\mssql\data\studentlog.ldf",size=5mb,maxsize=25mb,filegrowth=5mb)

這裏寫圖片描述

這裏寫圖片描述

這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章