Monday, April 1, 2013

Script to Shrink TempDatabase

USE tempdb
GO
 
DBCC shrinkfile (tempdev, 1024)
GO

DBCC shrinkfile (templog, 1024)
GO

DBCC shrinkfile (tempdb2, 1024)
GO

DBCC shrinkfile (tempdb3, 1024)
GO

DBCC shrinkfile (tempdb4, 1024)
GO

DBCC shrinkfile (tempdb5, 1024)
GO

DBCC shrinkfile (tempdb6, 1024)
GO

DBCC shrinkfile (tempdb7, 1024)
GO

DBCC shrinkfile (tempdb8, 1024)
GO

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.