Wednesday, March 21, 2012

Mecanics behind a Transaction (COMMIT/Rollback)

Anyone can point me a document that explain the mecanics
used by SQL Server to perform a transaction (i.e: Begin
Transaction -- Commit or Rollback Transaction).
I would like to know which tables are used to do so and
all the details.
Regards,Basic priciple is that all are updates are written to log file before =being written to the db. Once the transaction commits an entry is made =in the log recording that fact. If the system should fail, then on arestart the log is examined (from =the most recemt checkpoint) and any transactions that have been =committed since that checkpoint are written to the db. any db pages for =transactions that were open (uncommittted) at the point of failure will =be unwound from the db by re-applying the before-image values from the =log.
The idea of a checkpoint is a marker in the log that records the facet =that all "dirty" pages in cache (ie those that have been updated) are =flushed back to disk, so the information in the log is guaranteed =consistent at the tme a checkpoint is taken. These days checkpoint =intervals are automatically tuned by SQl serever and normally are fine.
That's the short version. Inside SQL Server 2000 by Kalen Delaney has =loads more. Or Microsoft 2072 course also covers all of this.
Mike John
"Roger Dion" <RogerRKDDion@.Roditek.com> wrote in message =news:0fe701c351f8$c42febc0$a001280a@.phx.gbl...
> Anyone can point me a document that explain the mecanics > used by SQL Server to perform a transaction (i.e: Begin > Transaction -- Commit or Rollback Transaction).
> > I would like to know which tables are used to do so and > all the details.
> > Regards,
> >=20

No comments:

Post a Comment