SQL Server 2005 restart service and db in reovery for over an hour now

  • I've been limping through my problems, seeking help on various forums, and had got to stage where I was going to detach my database, shrink my log file and reattach. However, starting up the service, while reducing tempdb, has put the db in recovery, where it has been for some time.

    I understand that the size of the log file is probably the cause of delay in recovery, but I'm unable to do anything about it until it has finished. Bit of a vicious circle!

    The job that failed yesterday ran for 9 hours, and was a huge update. I'm assuming it has a lot to do with the size of the log file, but does this mean it could take up to 9 hours to recover? Is there any other way round my problem?

    TIA

    B2B

  • hmm can you explain how did you do shrinking the log file till you said that you detach the DB!?

    :w00t::w00t:

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • When I posted this I hadn't been able to shrink the log file. I needed to have the SQL server service running for this, and when I restarted it, the database was in recovery mode. When I right-clicked on it I could select Tasks, but Shrink was greyed out.

    Eventually, after 3 and a half hours, the database finished recovering and I was able to complete the exercise. I didn't actually detach the database in the end - it was just one of several possible solutions that I could have tried, but none were avaliable until the db finished recovery. I was just concerned that this was taking so long when it seemed to be a matter of a few secs to recover, according to other posts I had read in my search.

    I've right-clicked the database in SQL Server Management Studio, chosen Tasks, Shrink, Files and selected the log file. It is a fraction of its former size and I've successfully completed a normal daily run, so I'm happy all is ok.

    Thanks for responding anyway

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

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