Skip to content

Instantly share code, notes, and snippets.

@jacobhackl
Last active September 1, 2015 15:42
Show Gist options
  • Save jacobhackl/68d03e0041d6c327e0d4 to your computer and use it in GitHub Desktop.
Save jacobhackl/68d03e0041d6c327e0d4 to your computer and use it in GitHub Desktop.
Re-sizing TempDB for sql server
/* Re-sizing TempDB to 15 GB */
USE [master];
GO
alter database tempdb modify file (name='tempdev', size = 15GB);
GO
USE [master];
GO
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev2', FILENAME = N'D:\data\tempdev2.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev3', FILENAME = N'D:\data\tempdev3.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev4', FILENAME = N'D:\data\tempdev4.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev5', FILENAME = N'D:\data\tempdev5.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev6', FILENAME = N'D:\data\tempdev6.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev7', FILENAME = N'D:\data\tempdev7.mdf' , SIZE = 15GB , FILEGROWTH = 0);
ALTER DATABASE [tempdb] ADD FILE (NAME = N'tempdev8', FILENAME = N'D:\data\tempdev8.mdf' , SIZE = 15GB , FILEGROWTH = 0);
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment