how to clear the tempdb

  • hi all please clear the problem how to clear the tempdb

  • Quickest way is to restart the SQL service which will create a blank TempDB when it restarts.

    What is the problem you are facing?

  • I ATTENDED A INTERVIEW hoe to clear the tempdb if only one server is their and do not restart the server

  • As this is for an interview question/answer, I recommend that you do the research and come back with potential answers to the question and then the great people here can hopefully point you in the right direction.

  • Google DBCC SHRINKFILE

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Abu Dina (9/21/2012)


    Google DBCC SHRINKFILE

    And after you've done that, find the kb article that advises not to shrink TempDB and why.

    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
  • Objects in tempdb should clear when the connections drop or they are dropped by the connection that created them. There are some objects created by the system to satisfy queries, and they should disappear when the query/batch ends.

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

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