重庆思庄Oracle、Redhat认证学习论坛

标题: 在线增加tempdb数据文件 [打印本页]

作者: 郑全    时间: 2021-3-19 14:25
标题: 在线增加tempdb数据文件
USE [master]
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev02', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev02.ndf' , SIZE = 1048576KB , FILEGROWTH = 131072KB )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev03', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev03.ndf' , SIZE = 1048576KB , FILEGROWTH = 131072KB )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev04', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev04.ndf' , SIZE = 1048576KB , FILEGROWTH = 10% )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev05', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev05.ndf' , SIZE = 1048576KB , FILEGROWTH = 10% )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev06', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev06.ndf' , SIZE = 1048576KB , FILEGROWTH = 10% )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev07', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev07.ndf' , SIZE = 1048576KB , FILEGROWTH = 10% )
GO
ALTER DATABASE [tempdb] ADD FILE ( NAME = N'tempdev08', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\temdev08.ndf' , SIZE = 1048576KB , FILEGROWTH = 10% )
GO

--加完后,确认一下:
sp_helpfile
go






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2