Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

LOG_BACKUP status not clearing in sys.databases Expand / Collapse
Author
Message
Posted Tuesday, August 27, 2013 7:29 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 4:14 AM
Points: 28, Visits: 163
SQL Server 2008R2 SP2

Does anyone know how to resolve this?

When I view sys.databases on one of our servers, I can see two databases that have “log_reuse_wait_desc” status of LOG_BACKUP.

But however many times I run backup log, this message does not clear.

BACKUP LOG [GHLPLAY] TO DISK=N'G:\Logs\GHLPLAY_Log.bak' WITH NOINIT, SKIP, STATS=20, NAME=N'GHLPLAY Log'
BACKUP LOG [GHLPLAY] TO DISK=N'G:\Logs\GHLPLAY_Log.bak' WITH NOINIT, SKIP, STATS=20, NAME=N'GHLPLAY Log'

select name n,recovery_model_desc,log_reuse_wait_desc lrwd,* from sys.databases
where name like 'GHLPLAY'

=> returns
n recovery_model_desc lrwd
GHLPLAY FULL LOG_BACKUP


It is not (as far as I know) causing any issues but it is a little concerning.

I don’t know if this is of any relevance but one of the two databases is the only mirrored database on the server – but is currently static (not being used).
Post #1488759
Posted Tuesday, August 27, 2013 8:01 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 12:34 PM
Points: 31,181, Visits: 15,626
As I flip through some dbs, I see some set with this state. Never noticed this.

Not sure if there's an issue here, but I agree it's disconcerting. I found this: http://msdn.microsoft.com/en-us/library/ms345414.aspx

My guess is this means that we have transactions in the active portion (active VLF) of the log and you need a log backup to clear. However, a log backup won't necessarily move to a new VLF, maybe because of new activity? Strange as I have some dbs in full without this and some in full with it.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1488787
Posted Tuesday, August 27, 2013 8:38 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 4:14 AM
Points: 28, Visits: 163
Thanks Steve.
It is at least re-assuring to know I am not the only one; I had not found anything similar by doing a web search.
All the standard texts just say the status will change after doing a Log Backup - and clearly this would always appear to be the case.
Post #1488806
Posted Tuesday, August 27, 2013 9:05 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 40,193, Visits: 36,597
If you've got enough activity, then the reason for the log not being reused can easily be log backup all the time, because by the time one log backup has completed there's more of the log that's waiting for the next log backup.
Also the status doesn't always update immediately. Sometimes requires a checkpoint for the status to change (not for the underlying log to be reusable, just for the status in sys.databases to change)

Why are you concerned? Is the log growing? Are there large portions of the log not being reused?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1488820
Posted Tuesday, August 27, 2013 9:29 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 4:14 AM
Points: 28, Visits: 163

Thanks Gail for the response.

Checkpoint makes no difference.

Certainly in one case, there is NO activity on the database; it is database that I set up to test mirroring and I am not using it. (Also NO open transactions.)

No issue as far as I know - just "not what it says on the tin". Hopefully no more than an acedemic concern.
Post #1488834
Posted Tuesday, August 27, 2013 2:34 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 12:34 PM
Points: 31,181, Visits: 15,626
glennhill (8/27/2013)

Thanks Gail for the response.

Checkpoint makes no difference.

Certainly in one case, there is NO activity on the database; it is database that I set up to test mirroring and I am not using it. (Also NO open transactions.)

No issue as far as I know - just "not what it says on the tin". Hopefully no more than an acedemic concern.


Same for me. This appears in my AdventureWorks2008 db on one instance that is a test instance and another instance for a different, sandbox db that only I use.

strange.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1488944
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse