Friday, February 24, 2012

Backup and locking

Hello,
We are running SQL Server 2000 on Windows Server 2003.
We want to run a backup several times during the day - some of these will be
done during normal business hours. If at a given moment a database is being
backed up and a query and/or update (via ADO through an ASP web page and/or
SQL statement issued through Query Analyser) is performed on the database
being backed up, will this result in any deadlock or timeout issues or
perhaps even corruption within the database.
Cheers
PhilIn short, no it will not.
SQL Server basically does the following when performing a database backup.
Mark the Beginning of the backup in the transaction log.
Perform the backup, copying extent by extent.
When finished, back up the portion of the transaction log that was active
during the backup process.
Mark the End of the backup in the transaction log.
What this does is allow you to continue to perform operations on the
database while a backup occurs. Those changes will be logged and that
active portion of the log will also be backed up. This gives you a
snapshot of the database at the end of the backup cycle.
Long running transactions may slow the backup process down, however it
should not corrupt it.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
"Horace" <someone@.nowhere.com> wrote in message
news:K5bod.98$Df3.1729@.nnrp1.ozemail.com.au...
> Hello,
> We are running SQL Server 2000 on Windows Server 2003.
> We want to run a backup several times during the day - some of these will
be
> done during normal business hours. If at a given moment a database is
being
> backed up and a query and/or update (via ADO through an ASP web page
and/or
> SQL statement issued through Query Analyser) is performed on the database
> being backed up, will this result in any deadlock or timeout issues or
> perhaps even corruption within the database.
> Cheers
> Phil
>

No comments:

Post a Comment