Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Delete or move tempdb .ndf file Expand / Collapse
Posted Friday, June 1, 2007 11:51 AM


Group: General Forum Members
Last Login: Friday, April 10, 2015 9:35 AM
Points: 450, Visits: 571

We have tempdb on a different physical disk than our user databases.  A few weeks ago, we were running out of space on that disk during a data warehouse load.  Until we could buy a bigger disk, we created a .ndf file on our main data drive.  We now have acres of space on the tempdb disk, but SQL Server insists on using both the .ndf and .mdf files during the load.  We tried deleting the .ndf file, but got an error message.  I found a script example here (love SSC, Steve!) to move the file, but I don't think I need the .ndf anymore and would like to delete it. (A colleague tried the delete from EM, so I don't have the text of the message). Any ideas?

There is no "i" in team, but idiot has two.

Post #370759
Posted Friday, June 1, 2007 12:21 PM



Group: General Forum Members
Last Login: Wednesday, November 25, 2015 6:19 AM
Points: 6,799, Visits: 8,745

how about :

use tempdb
('locigal_file_name' , EMPTYFILE ;


alter database tempdb
REMOVE file 'locigal_file_name' ;

check bol at


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help

- How to prevent a sore throat after hours of presenting ppt ?

"press F1 for solution", "press shift+F1 for urgent solution"

Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #370769
Posted Thursday, April 2, 2015 6:52 PM


Group: General Forum Members
Last Login: Thursday, September 10, 2015 7:38 PM
Points: 13, Visits: 45
Thank Johan...

Hank Freeman

Hank Freeman
Senior SQL Server DBA / Data & Solutions Architect
678-414-0090 (Personal Cell)
Post #1674058
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse