13883183259 023-68037655 咨询热线:
当前位置: 主页 > 关于思庄 > 技术分享 >

sqlserver技术分享—在线增加tempdb数据文件

发布时间:2021-06-29
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


联系我们 重庆思庄科技有限公司
023-68037655
重庆思庄科技有限公司 版权所有© 备案号:渝ICP备12004239号-4

渝公网安备 50010702502184号

<<