Hypothetical question:
If a maintenance plan is scheduled to run a full backup of several databases while they’re online, and during this time other jobs are scheduled to run (stored procedures, SSIS packages etc), what happens to these jobs during the backup?
I’m guessing either:
- The job is paused until the backup is completed, then they’re run in the same order they were scheduled to.
Or
- SQL Server works out what tables will be affected by each scheduled job and backs them up after the job completes?!
Or
- SQL Server creates a “snapshot” of all the tables before the back up starts, any changes to them (including changes made by the jobs run during the backup) are added to the transaction log, which should be backed up separately.
…are any of my ideas correct?!
Idea #3 is the closest to what happens. The key is that when the backup operation completes, the backup file will be in a state that allows for the restore of the database to a consistent state.
From the documentation:
…