July 5, 2013 at 12:31 am
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 ?
July 5, 2013 at 1:13 am
How to Drop a TempDB Database File[/url]
First Google result for sql server remove tempdb data file.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
July 5, 2013 at 2:50 am
sp_helpdb 'tempdb'
USE tempdb
GO
DBCC SHRINKFILE (tempdev6, EMPTYFILE)
GO
ALTER DATABASE tempdb
REMOVE FILE tempdev6; --to delete "tempdev6" data file
GO
--
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply