- 打卡等级:无名新人
- 打卡总天数:2
- 打卡月天数:0
- 打卡总奖励:12
- 最近打卡:2024-10-03 09:22:02
|
发表于 2016-5-18 08:09:47
|
显示全部楼层
USE master
go
IF DB_ID (N'NC63') IS NOT NULL
DROP DATABASE [NC63]
go
CREATE DATABASE [NC63]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NC63] ADD FILEGROUP [NNC_INDEX03]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_data01', FILENAME = N'D:\NC\nnc_data01_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_data02', FILENAME = N'D:\NC\nnc_data02_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_data03', FILENAME = N'D:\NC\nnc_data03_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_index01', FILENAME = N'D:\NC\nnc_index01_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_index02', FILENAME = N'D:\NC\nnc_index02_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NC63] ADD FILE(NAME = N'nnc_index03', FILENAME = N'D:\NC\nnc_index03_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX03]
go
-- 调整临时表空间
declare @name char(50)
declare @sql nvarchar(500)
select @name=rtrim(name) from tempdb.dbo.sysfiles where status & 0x40 != 0x40
set @sql='alter database tempdb modify file ( name='+@name+',size=600mb,filegrowth=10mb)'
exec master.dbo.sp_executesql @sql
|
|