If I run a SQL Server database backup via Management Studio and there are scripts running at the same time, does the backup reflect the point in time when the backup was started or when it ended? My db is about 10GB so the backup takes some time, meaning there’s lots of things that could go on in the meantime.
I’m using SQL Server 2008 R2
Now I also asked in dba.
(Should this question just be removed/moved/what?)
A full backup includes the image of each allocated data page in the database and all the log that was generated from the moment the backup started until the backup finished all the data pages copy.
At restore time the data is copied out and the log is copied out and laid out on disk. If the RESTORE command was issued as
WITH RECOVERY(default) then normal recovery is run on the database, meaning the log is replayed. This brings the database back into a consistent state. If the RESTORE was issuedWITH NORECOVERYthen the log and data are left ‘as is’ and the database can accept more log to be restored, copied out from other LOG backup(s) into the LDF file(s). Eventually, when the database is recovered, it is brought back into consistent state. See Restore and Recovery Overview (SQL Server).