WORKING WITH TEMPDB DATABASE IN MSSQL 2005

  • House Good day,

    I need someone that knows how to delete or reduce a data in tempdb database in mssql server 2005 to share the process and the script to do so to me. thanks

  • The tempdb is re-created every time you restart SQL Server.

    If you need to Shrimk the tempdb, see the following link...

    http://support.microsoft.com/kb/307487

    Atif Sheikh

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • Temp tables are dropped automatically as soon as the table goes out of scope or the connection that created it closes. Unless you're creating explicit tables in tempDB, there's no need to worry about deleting data.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • issuing a checkpoint will clear any data which is committed. I take it you are talking about the physical tempdb files here? There is a situation that space taken by tempdb in the buffer cache is not cleared by a checkpoint.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

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

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