Friday, February 17, 2012

Doing a Transaction Log Backup.

I am going to back up my databases using a Database Maintenence Plans (from
Enterprise Manager). I see there is a Complete Backup and a Transaction Log
Backup.
If I do a Complete Backup, should I do a Transaction Log Backup as well ?
What would you do a Transaction Log Backup ?
Thanks,
CraigHere is an excerpt from SQL Server Books OnLine:
Transaction Log Backups
The transaction log is a serial record of all the transactions that have
been performed against the database since the transaction log was last backe
d
up. With transaction log backups, you can recover the database to a specific
point in time (for example, prior to entering unwanted data), or to the poin
t
of failure.
When restoring a transaction log backup, Microsoft? SQL Server? rolls
forward all changes recorded in the transaction log. When SQL Server reaches
the end of the transaction log, it has re-created the exact state of the
database at the time the backup operation started. If the database is
recovered, SQL Server then rolls back all transactions that were incomplete
when the backup operation started.
Transaction log backups generally use fewer resources than database backups.
As a result, you can create them more frequently than database backups.
Frequent backups decrease your risk of losing data.
Note Sometimes a transaction log backup is larger than a database backup.
For example, a database has a high transaction rate causing the transaction
log to grow quickly. In this situation, create transaction log backups more
frequently.
Transaction log backups are used only with the Full and Bulk-Logged Recovery
models. For more information, see Using Recovery Models.
Using Transaction Log Backups with Database Backups
Restoring a database using both database and transaction log backups works
only if you have an unbroken sequence of transaction log backups after the
last database or differential database backup. If a log backup is missing or
damaged, you must create a database or differential database backup and star
t
backing up the transaction logs again. Retain the previous transaction logs
backups if you want to restore the database to a point in time within those
backups.
The only time database or differential database backups must be synchronized
with transaction log backups is when starting a sequence of transaction log
backups. Every sequence of transaction log backups must be started by a
database or differential database backup.
Usually, the only time that a new sequence of backups is started is when the
database is backed up for the first time or a change in recovery model from
Simple to Full or Bulk-Logged has occurred. For more information, see
Switching Recovery Models.
Let me know if it helps,
Edgardo Valdez
MCSD, MCDBA, MCSE
"Craig HB" wrote:

> I am going to back up my databases using a Database Maintenence Plans (fro
m
> Enterprise Manager). I see there is a Complete Backup and a Transaction L
og
> Backup.
> If I do a Complete Backup, should I do a Transaction Log Backup as well ?
> What would you do a Transaction Log Backup ?
> Thanks,
> Craig|||Thanks, Edgardo
That was helpful. It seems from that excerpt that I should do transaction
backups between database backups.
Just one more question on that:
When you restore a transaction log, do you restore it in the same way as
restoring a database ? i.e. Enterprise Manager / All Tasks / Retore / Select
the file and click OK.
Thanks,
Craig|||Sorry for not replying before.
I usually do Transaction Log Backups in between full backups, with a
frequency that varies from 10 min to 4 hours, depending of the type of
database (production, development, etc), disk space available, etc.
You can also refer to this article that can help you
(http://www.microsoft.com/technet/pr...st.mspx
)
, specially where it says "Performing Transaction Log Backups through
Enterprise Manager"
I hope it helps you.
"Craig HB" wrote:

> Thanks, Edgardo
> That was helpful. It seems from that excerpt that I should do transaction
> backups between database backups.
> Just one more question on that:
> When you restore a transaction log, do you restore it in the same way as
> restoring a database ? i.e. Enterprise Manager / All Tasks / Retore / Sele
ct
> the file and click OK.
> Thanks,
> Craig

No comments:

Post a Comment