最新sql建表空间及新建用户操作手册.docx
Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-datesql建表空间及新建用户操作手册sql建表空间及新建用户操作手册USE master;goIF DB_ID (N'NCDB') IS NOT NULLDROP DATABASE NCDB;goCREATE DATABASE NCDBgo ALTER DATABASE NCDB ADD FILEGROUP NNC_DATA01goALTER DATABASE NCDB ADD FILEGROUP NNC_DATA02goALTER DATABASE NCDB ADD FILEGROUP NNC_DATA03goALTER DATABASE NCDB ADD FILEGROUP NNC_INDEX01goALTER DATABASE NCDB ADD FILEGROUP NNC_INDEX02goALTER DATABASE NCDB ADD FILEGROUP NNC_INDEX03goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_data01', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_data01_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA01goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_data02', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_data02_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA02goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_data03', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_data03_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA03goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_index01', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_index01_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC_INDEX01goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_index02', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_index02_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC_INDEX02goALTER DATABASE NCDB ADD FILE(NAME = N'nnc_index03', FILENAME = N'D:Microsoft SQL ServerMSSQL$SQL1datannc_index03_Data.NDF' , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC_INDEX03Go1、新建表空间以上为执行脚本,红色部分需更改,NCDB 改为自己想要创建的数据库名称,地址改为存放表空间的地址新建查询-执行地址要自己创建,尽量在系统盘完成后显示如下2、新建用户右键安全性下的登录名新建用户一般勾 PUBLIC 勾选sysadmin会拥有所有权限,按需要勾选 需要权限的数据库确认即可-