SQL Server Backup/Restore Optimization TipsDecember 9, 2002
When you perform a backup, some SQL Server commands cannot be made; for example, during backup you cannot run an ALTER DATABASE statement with either the ADD FILE or REMOVE FILE options, you cannot shrink a database, you cannot run a CREATE INDEX statement, and so on.
So, to decrease the backup operation's time, you can perform the backup to the
local hard disk first, and then copy backup file(s) to tape later, as a tape device is usually much slower than a hard disk.
The faster the backup operation, the less impact there will be on the server when the backup occurs.
Using multiple backup devices forces SQL Server to create a separate
backup thread for each backup device, so the backups will be written
to all backup devices in parallel.
This can improve performance because a separate thread will be created
for each backup device on each disk in order to write the data for the backup
in parallel.
Because backups are very resource effective, try to schedule them during
CPU idle time and slow production periods.
Full backups take the longest to perform in comparison with
differential and incremental backups, but they are the fastest to restore.
Because a differential backup captures only those data pages that have
changed after the last database backup, you can eliminate much of the
time the server spends rolling transactions forward when recovering
transaction logs from the incremental backups. Using a differential backup,
in this case, can improve the recovery process by several times.
This can result in quicker backup operations. The faster the backup
operation takes, the less impact there will be on the server when
the backup occurs.
You can verify the following counters:
The more often you make backups, the smaller they will be and
the less impact there will be on the server when the backup occurs.
So, to avoid locking users for a long time during everyday work,
you can perform backups more often.
Note: Another benefit to this is that the more often you make backups,
the less data you will lose if the database becomes corrupt.
The tape drives perform better if they have a dedicated SCSI bus for
each tape drive used. Using a separate SCSI bus for a tape drive can
result in maximum backup performance and can prevent conflicts with
other drive array access. Microsoft recommends using a dedicated SCSI
bus for the tape drives whose native transfer rate exceeds 50 percent
of the SCSI bus speed.
The SQL Server 2000 snapshot backup and restore technologies work in
conjunction with third party hardware and software vendors.
The main advantages of snapshot backups and restores are that they can
be done in a very short time, typically measured in seconds, not hours,
and reduce the backup/restore impact on the overall server performance.
Snapshot backups are accomplished by splitting a mirrored set of disks
or creating a copy of a disk block when it is written and require
special hardware and software.
|