Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Deepak03@rediffmail.com
Starting Member
11 Posts |
Posted - 2009-04-27 : 08:25:58
|
Hi, I wanted to know in details what checkpoint does in sql server. I have made search but didn’t get this in depth. Does anyone have idea about any article or have knowledge, who can explain in depth please. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-04-27 : 08:52:31
|
Did you look in Books Online?quote: CHECKPOINTWrites all dirty pages for the current database to disk. Dirty pages are data pages that have been entered into the buffer cache and modified, but not yet written to disk. Checkpoints save time during a later recovery by creating a point at which all dirty pages are guaranteed to have been written to disk.
There are more details in Books Online. |
 |
|
Deepak03@rediffmail.com
Starting Member
11 Posts |
Posted - 2009-04-27 : 09:22:24
|
Thanks Rob,If we run checkpoint for log file and truncate it.......the data loss cannt be recovered i think, whats the pro anc cons to run checkpoint.quote: Originally posted by robvolk Did you look in Books Online?quote: CHECKPOINTWrites all dirty pages for the current database to disk. Dirty pages are data pages that have been entered into the buffer cache and modified, but not yet written to disk. Checkpoints save time during a later recovery by creating a point at which all dirty pages are guaranteed to have been written to disk.
There are more details in Books Online.
|
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-04-27 : 09:46:26
|
Checkpoint only truncates the log file if you are using the Simple recovery model. There's no data loss involved; quite the opposite, it guarantees the data in memory is written to disk. The only con of using it is the associated disk activity to flush buffers to disk, you may see a performance hit while it runs. You can also control how long it takes by specifying a timeout. |
 |
|
|
|
|