Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


tempdb file delete


tempdb file delete

Author
Message
sqldbaonly
sqldbaonly
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
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 ?
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16467 Visits: 13207
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 SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
sqldbaonly
sqldbaonly
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
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


--
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search