- 打卡等级:无名新人
- 打卡总天数:3
- 打卡月天数:1
- 打卡总奖励:13
- 最近打卡:2024-12-06 08:37:54
|
楼主 |
发表于 2016-5-10 10:41:50
|
显示全部楼层
USE master
go
IF DB_ID (N'NC50') IS NOT NULL
DROP DATABASE [NC50]
go
CREATE DATABASE [NC50]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_INDEX03]
go
ALTER DATABASE [NC50] ADD FILEGROUP [NNC_iufo]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_data01', FILENAME = N'C:\NC\nnc_data01_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA01]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_data02', FILENAME = N'C:\NC\nnc_data02_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA02]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_data03', FILENAME = N'C:\NC\nnc_data03_Data.NDF' , SIZE = 500, FILEGROWTH = 200) TO FILEGROUP [NNC_DATA03]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_index01', FILENAME = N'C:\NC\nnc_index01_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX01]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_index02', FILENAME = N'C:\NC\nnc_index02_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX02]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_index03', FILENAME = N'C:\NC\nnc_index03_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_INDEX03]
go
ALTER DATABASE [NC50] ADD FILE(NAME = N'nnc_iufo', FILENAME = N'C:\NC\nnc_iufo_Data.NDF' , SIZE = 500, FILEGROWTH = 100) TO FILEGROUP [NNC_iufo]
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=500mb,filegrowth=10mb)'
|
|