《最新sql建表空间及新建用户操作手册.docx》由会员分享,可在线阅读,更多相关《最新sql建表空间及新建用户操作手册.docx(14页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、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 (NNCDB) IS NOT NULLDROP DATABASE NCDB;goCREATE DATABASE NCDBgo ALTER DATABASE NCDB ADD FILEGROUP NNC_DATA01goALTER DATABASE NCDB AD
2、D 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 = Nnnc_data01, FILENAME = ND:Microsoft SQL ServerMSSQL$
3、SQL1datannc_data01_Data.NDF , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA01goALTER DATABASE NCDB ADD FILE(NAME = Nnnc_data02, FILENAME = ND:Microsoft SQL ServerMSSQL$SQL1datannc_data02_Data.NDF , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA02goALTER DATABASE NCDB ADD FILE(NAME = Nnnc_
4、data03, FILENAME = ND:Microsoft SQL ServerMSSQL$SQL1datannc_data03_Data.NDF , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP NNC_DATA03goALTER DATABASE NCDB ADD FILE(NAME = Nnnc_index01, FILENAME = ND:Microsoft SQL ServerMSSQL$SQL1datannc_index01_Data.NDF , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC
5、_INDEX01goALTER DATABASE NCDB ADD FILE(NAME = Nnnc_index02, FILENAME = ND:Microsoft SQL ServerMSSQL$SQL1datannc_index02_Data.NDF , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC_INDEX02goALTER DATABASE NCDB ADD FILE(NAME = Nnnc_index03, FILENAME = ND:Microsoft SQL ServerMSSQL$SQL1datannc_index03_Data.NDF , SIZE = 200, FILEGROWTH = 100) TO FILEGROUP NNC_INDEX03Go1、新建表空间以上为执行脚本,红色部分需更改,NCDB 改为自己想要创建的数据库名称,地址改为存放表空间的地址新建查询-执行地址要自己创建,尽量在系统盘完成后显示如下2、新建用户右键安全性下的登录名新建用户一般勾 PUBLIC 勾选sysadmin会拥有所有权限,按需要勾选 需要权限的数据库确认即可-
限制150内