When you issue a backup instruction, the database may be in use by many people. If you later need to use your backup to restore your database, you need to know what information has been backed up, and what has not.
The database server performs a backup as follows:
Issue a checkpoint. Further checkpoints are disallowed until the backup is complete.
Make a backup of the database files, if the backup instruction is for a full backup.
Make a backup of the transaction log.
The backup includes all operations recorded in the transaction log before the final page of the log is read. This may include instructions issued after the backup instruction was issued.
The backup copy of the transaction log is generally smaller than the online transaction log. The database server allocates space to the online transaction logs in multiples of 64 KB, so the transaction log file size generally includes empty pages. However, only the non-empty pages are backed up.
If the backup instruction requires the transaction log to be truncated or renamed, uncommitted transactions are carried forward to the new transaction log.
For more information about renaming and truncating the transaction log, see Designing backup procedures.
Mark the backup image of the database to indicate that recovery is needed. This causes any operations that happened since the start of the backup to be applied. It also causes operations that were incomplete at the checkpoint to be undone if they were not committed.