Why I can't shrink the log file?

  • Hello all

    I noticed that in 2008 the Tempdb log file is not recreated when I restart the service, I have to shrink it manually

    Today after a full reboot of the server the log doesn't want to be shrinked to less than 3 gb. I tried with truncate only, setting the size manually and in the options/file menu of the database, to no avail, when i run

    select log_reuse_wait_desc from sys.databases where name = 'tempdb' I get a 'Nothing'

    Any Idea of what is using the tempdb log?

    Thanks in advance

  • Just curious but have you checked to see what the size of your log file is in model?

  • is it exactly 3GB? Have you restarted the service since changing the size of the log file?

    _________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie

  • How are u shrinking the file ? SSMS or DBCC ?

    What message do you get when you try to shrink ?

    Jayanth Kurup[/url]

  • Careful trying to shrink tempDB, it can cause problems that will require a server restart. You should quiesce the server completely (no user connections at all) before trying to shrink tempDB.

    There is a kb article on this... somewhere.

    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
  • Hello All

    the issue is this:

    In previous versions (2005) I set the initial size of tempdb log and after the reboot the size returns to that initial one, in 2008, after a reboot with nobody nut me connected the size of the log is the last size that the server had at the moment of the reboot, on 2005 tempdb got recreated with a reboot, not is not the case

    Now, after the reboot I tried to shrink the log with dbcc and ssms with truncateonly and setting a size, in both cases the procedure ends, but the size of tempdb does not decrease.

    On a test server the only way i found to do that is to stop the service, delete the files and start the service again, but I am well aware of the dangers of this

Viewing 6 posts - 1 through 5 (of 5 total)

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