Friday, October 1, 2010

Internal Process When a checkpoint occurs

Hi today Iam explaining about how do checkpoint works and what gets logged.

When a checkpoint occurs no matter how its triggered :
  • All dirty data pages for the database are written to disk.
  • Log records describing the checkpoint are generated.
  • The LSN of the checkpoint  is recorded in the database boot page
  • Before a page is written to disk, all log records up to and including the most recent log record describing a change to that page are written to disk. This guarantees recovery can work and is called write-ahead logging. Log records are written to the log sequentially, and log records from multiple transactions will be mix together in the log. The log cannot be selectively written to disk, so writing a dirty page to disk that only has a single log record affecting it may mean writing many more previous log records to disk as well.
  • If in the SIMPLE recovery model, the VLFs in the log are checked to see whether they can be marked inactive

No comments:

Post a Comment