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

Checkpoint Duration Expand / Collapse
Author
Message
Posted Sunday, August 16, 2009 5:36 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 AM
Points: 368, Visits: 540
Is there any way to know, what is the duration set for Checkpoint.

I know we can set\customize it, but i want to know the current duration, if someone has changed it.

Also i want to know if there is any default duration for checkpoint.
As per my understanding SQL Server manage this automatically.

Is it related to REcovery Interval Setting?


Regards,
Sarabpreet Singh
SQLServerGeeks.com/blogs/sarab
www.Sarabpreet.com
Twitter: @Sarab_SQLGeek
Post #771599
Posted Sunday, August 16, 2009 5:54 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, January 26, 2014 11:13 AM
Points: 2,242, Visits: 3,641
As per my knowledge, there is no default duration for checkpoint to happen. It happens based on certain events.
here are some excerpts from BOL.
Events That Cause Checkpoints
Before a database backup, the Database Engine automatically performs a checkpoint so that all changes to the database pages are contained in the backup. In addition, checkpoints occur automatically when either of the following conditions occur:

The active portion of the log exceeds the size that the server could recover in the amount of time specified in the recovery interval server configuration option.

The log becomes 70 percent full, and the database is in log-truncate mode.
A database is in log truncate mode when both these conditions are TRUE: the database is using the Simple recovery model, and, after execution of the last BACKUP DATABASE statement that referenced the database, one of the following events occurs:

A minimally logged operation is performed in the database, such as a minimally logged bulk copy operation or a minimally logged WRITETEXT statement is executed.

An ALTER DATABASE statement is executed that adds or deletes a file in the database.

Also, stopping a server issues a checkpoint in each database on the server. The following methods of stopping SQL Server perform checkpoints for each database:

Using SQL Server Configuration Manager.

Using SQL Server Management Studio.

Using the SHUTDOWN statement.


Refer HERE
The page also explains the factors affecting the duration of checkpoint operations.





Pradeep Singh
Post #771602
Posted Sunday, August 16, 2009 6:11 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 AM
Points: 368, Visits: 540
but i want to know the current duration



Regards,
Sarabpreet Singh
SQLServerGeeks.com/blogs/sarab
www.Sarabpreet.com
Twitter: @Sarab_SQLGeek
Post #771604
Posted Sunday, August 16, 2009 6:24 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Sunday, January 26, 2014 11:13 AM
Points: 2,242, Visits: 3,641
you can query fn_dblog undocumented command to browse through the transaction log to find out when it was last run. I'm unaware about the exact search string for checkpoint but perhaps u'll need to place the condition on the context or operation column. just query this command to look out for exact detail u need.
see if this helps.





Pradeep Singh
Post #771606
Posted Sunday, August 16, 2009 8:39 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 @ 10:16 AM
Points: 41,565, Visits: 34,488
There's no default duration or setting that affects a checkpoint's duration. You can change the recovery interval, which affects how often the checkpoint runs, nothing else.

How long a checkpoint takes depends totally on how many changes have occurred in the database since the previous checkpoint ran.



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 #771621
Posted Sunday, August 16, 2009 10:29 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 AM
Points: 368, Visits: 540
Ok, so if i want to commit all the changes at a rapid speed i can request a checkpoint with a small duration & SQL will put all the required resources to complete checkpoint within the requested time.

Got It.

But lets say i am changing the Recovery Interval(I know its not the best practice, i am just taking an example) to a duration of 90Secs then whether this setting will be applied for the checkpoint (which SQL runs at the time of startup) or the setting will be applied for each and every Checkpoint which happens at some specific intervals?

Thanks


Regards,
Sarabpreet Singh
SQLServerGeeks.com/blogs/sarab
www.Sarabpreet.com
Twitter: @Sarab_SQLGeek
Post #771634
Posted Sunday, August 16, 2009 10:56 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 @ 10:16 AM
Points: 41,565, Visits: 34,488
Sarab (8/16/2009)
Ok, so if i want to commit all the changes at a rapid speed i can request a checkpoint with a small duration & SQL will put all the required resources to complete checkpoint within the requested time.


No, not at all.

You cannot control the duration of checkpoint. It runs for as long as it takes to write all dirty data pages to disk. SQL will write those pages as fast as it can, depending on the throughput of the IO subsystem.

But lets say i am changing the Recovery Interval(I know its not the best practice, i am just taking an example) to a duration of 90Secs then whether this setting will be applied for the checkpoint (which SQL runs at the time of startup) or the setting will be applied for each and every Checkpoint which happens at some specific intervals?


Recovery interval indirectly controls how often checkpoint runs.

By setting the recovery interval to 90 sec, you're saying to SQL run the checkpoint process often enough that should the SQL service restart unexpectedly, the duration of the restart recovery will not exceed 90 seconds.

The higher the restart interval is set, in general, the less often checkpoint will run and the longer it'll take each time. But you cannot directly control checkpoint interval or duration.

This blog post may help a bit - http://sqlinthewild.co.za/index.php/2009/06/26/the-lazy-writer-and-the-checkpoint/



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 #771636
Posted Sunday, August 16, 2009 11:20 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 AM
Points: 368, Visits: 540
Thanks.
now its Clear to me.



Regards,
Sarabpreet Singh
SQLServerGeeks.com/blogs/sarab
www.Sarabpreet.com
Twitter: @Sarab_SQLGeek
Post #771638
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse