GilaMonster (12/21/2009)
Ivanna Noh (12/21/2009)
Gail - when i query sys.databases the value in the log_reuse_wait_desc column is 'LOG_BACKUP' - is that a result of mirroring?
Nope. It means exactly what it says. The space in the log cannot be reused at this point because it's waiting for a log backup to happen. If it was mirroring, that columns would say 'DATABASE_MIRRORING'
Do note the comment from Books Online.
If the reason is LOG_BACKUP, it may take two backups to actually free the space.
Most relevant as usual!
Ivanna, you may need to synchronise with the scheduled trnlog bkp! Depending on how long that takes, your automated "SHRINK" may hit the problem.
Why not ... redo backup ... within the TRY-CATCH block WHILE log_reuse_wait_desc = 'LOG_BACKUP' (or 'DATABASE_MIRRORING' for good measure !!)