Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


LOG_BACKUP status not clearing in sys.databases


LOG_BACKUP status not clearing in sys.databases

Author
Message
glennhill
glennhill
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 171
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).
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36146 Visits: 18750
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
My Blog: www.voiceofthedba.com
glennhill
glennhill
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 171
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.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47261 Visits: 44392
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, 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


glennhill
glennhill
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 171
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.
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36146 Visits: 18750
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
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search