Resizing tempdb files

  • Hi all,

    i added some more files (each file is 200MB) for the tempdb and moved those files to the separate set of disks, but now i need to resize each file to 50MB and move them back to the original location where sql was first installed.

    it's a named instance on active/active cluster

    Is this possible?

  • First of all why would you try all this in an Cluster Environment (Assuming it is in production).

    To resize the data file to less than the currently allocated space, you need to shrink the data file. Then resize it. Here is an example.

    USE [tempdb]

    GO

    DBCC SHRINKFILE (N'tempdev' , 50)

    GO

    ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'tempdev', SIZE = 50MB )

    GO

    You may refer this article for moving tempdb database to a new location.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thank you for reply,

    This is not in production, i am doing this in QA.

  • Thank you very much for you timely help.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply