tempdb file delete

  • 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 ?

  • 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

  • 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