Tempdb Data File Size...

  • Hi,

    I have a 4Gb data file for one of my Tempdbs.

    I want to shrink it down and release the space to the O/S - and have run dbcc shrinkfile + truncate only - but this has had no effect, the file is still virtually empty but still 4Gb in size.

    Any ideas on how I can release this space to the O/S...?

    Cheers.

  • Just restart the SQL Server services you will have all space occupied by tempdb released to disk but before that check what is the initial size that is given for tempdb database in your server.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • the truncateonly option means shrinkfile will not attempt to move any data before releasing space to the OS, so perhaps you happen to have data right at the end of the file. I suggest you try dbbcc shrinkfile(templog,targetsize) without the truncateonly. Might need to run twice.

    ---------------------------------------------------------------------

  • You can even use the no_log option in that case.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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