Skip to content

Instantly share code, notes, and snippets.

@ersingencturk
Created January 3, 2015 02:09
Show Gist options
  • Save ersingencturk/7bf636cbb1ea778bb8a3 to your computer and use it in GitHub Desktop.
Save ersingencturk/7bf636cbb1ea778bb8a3 to your computer and use it in GitHub Desktop.
moving sql server temp file to another disk
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE
(NAME = tempdev, FILENAME = 'D:\sql\Tempdb.mdf');
GO
ALTER DATABASE tempdb
MODIFY FILE
(NAME = templog, FILENAME = 'D:\sql\Tempdb.ldf');
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment