The log for database "databasename" is not available.

  • "The log for database MYDB is not avaiable" .. when writing an UPDATE statement to a table.

    We first observed this problem today in a database but I found out that in addition we have had an error in the application log

    "Backup Request: WaitForIOCompletion: Write failure on backup device "Y:\MyDB_Log.ld.

    Operating Syste Rror 1117: The request could not be perfoirmed because of an IO error".

    I can perfectly see the LUN where the transaction log is and I can get to that folder an d connect to the database to do SELECTS or even see the properties from Enterprise Manager, but we cannot do anything that involves the transaction log.

  • Hi,

    It sure sounds like there is a potential problem with the hardware.  Just because you can see the lun and get to the folder doesn't mean there's a problem.  There could be a write problem that isn't affecting reads for example.

    Check the SQL Server error log.  If you see any 823 errors refer to the following articles.

    http://support.microsoft.com/default.aspx?kbid=828339

    and

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

    I'd always get the hardware vendor to check for hardware failures.  The fact that the error message indicates that there is an IO error indicates that this is where the problem most likely lies.

    Good luck.

  • I had the "The Log for Database 'X' is not available" error as well. I detached and reattached the database, and problem solved.

  • Same problem here. Reattaching worked for me, thanks.

  • I could not detach as it gave the same error, but I took it offline and then back online and it was working fine.

    Ed Watson aka SQLGator
    Microsoft SQL Server MVP

    Follow me on Twitter!
    Go Gators!

  • I ran into this issue today and confirmed that the detach/reattach or offline/online switch works for current SQL versions as well (SQL 2008 R2 in this case).

  • Taking the database "offline then "online" again seems to fix the issue.

  • •Take the database offline.

    •Bring it back online.

    •Run DBCC checkdb to make sure everything is good.

    •Set Auto Close = False.

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

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