|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:47 AM
Points: 1,185,
Visits: 2,102
|
|
Hello All
I've been doing some research and testing on the topic of the Checkpoint process
I understand that the job of the checkpoint process is to write dirty pages to disk and it also writes an entry in the log indicating that all transactions before that point are written to disk, reducing database recovery time when the database starts up. Thanks http://sqlinthewild.co.za/index.php/2009/06/26/the-lazy-writer-and-the-checkpoint/
My question is, if I run a transaction against my database and I run a log backup before the checkpoint process starts, does that transaction form part of the active or inactive portion of the log?
In other words, does a checkpoint process have to run to declare the transaction complete and part of the inactive portion of the log?
Thanks
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 37,663,
Visits: 29,915
|
|
Active. The log records are still needed by something, in this case the checkpoint.
A VLF is only inactive when none of the log records in it are needed for anything.
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:47 AM
Points: 1,185,
Visits: 2,102
|
|
GilaMonster (10/13/2012) Active. The log records are still needed by something, in this case the checkpoint.
A VLF is only inactive when none of the log records in it are needed for anything.
Thanks
I was trying to figure out why after running a log backup the fn_dblog(null,null) command still returns entries in the log.
I did notice that if I issue a checkpoint command and then take the log backupm the fn_dblog(null,null) only shows the checkpoint entries.
What would happen in a case where the recovery interval was set to something like every 5 hours, wouldn't that be harmful to the log?
Thanks
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:47 AM
Points: 1,185,
Visits: 2,102
|
|
GilaMonster (10/13/2012) Active. The log records are still needed by something, in this case the checkpoint.
A VLF is only inactive when none of the log records in it are needed for anything.
Would it be correct to say that in order for a transaction to be cleared from the log through a log backup, the transaction has to be commited and there has to be a checkpoint ?
Is this right?
Thanks
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 37,663,
Visits: 29,915
|
|
For a VLF to be marked inactive by a log backup, none of the log records within that VLF must be needed for anything. Anything includes checkpoint, active transaction, replication, mirroring, CDC and a few other things.
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:47 AM
Points: 1,185,
Visits: 2,102
|
|
GilaMonster (10/14/2012) For a VLF to be marked inactive by a log backup, none of the log records within that VLF must be needed for anything. Anything includes checkpoint, active transaction, replication, mirroring, CDC and a few other things.
Thanks
|
|
|
|