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

tempdb file delete Expand / Collapse
Author
Message
Posted Friday, July 5, 2013 12:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 31, 2014 8:49 PM
Points: 8, Visits: 79

ALTER DATABASE tempdb
MODIFY FILE (name=tempdev,size=512MB);
GO
ALTER DATABASE tempdb
ADD FILE (name=tempdev2,size=512MB,filename='N:\Tempdb\tempdev2.ndf');
GO
ALTER DATABASE tempdb
ADD FILE (name=tempdev3,size=512MB,filename='N:\Tempdb\tempdev3.ndf');
GO
ALTER DATABASE tempdb
ADD FILE (name=tempdev4,size=512MB,filename='N:\Tempdb\tempdev4.ndf');
I want delete file tempdb4 then how to do it ?

Post #1470584
Posted Friday, July 5, 2013 1:13 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:00 AM
Points: 13,520, Visits: 11,313
How to Drop a TempDB Database File

First Google result for sql server remove tempdb data file.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470599
Posted Friday, July 5, 2013 2:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 31, 2014 8:49 PM
Points: 8, Visits: 79
sp_helpdb 'tempdb'
USE tempdb
GO
DBCC SHRINKFILE (tempdev6, EMPTYFILE)
GO

ALTER DATABASE tempdb
REMOVE FILE tempdev6; --to delete "tempdev6" data file
GO


--
Post #1470627
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse