We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

MS SQL backup and transaction log

froggy_bill
froggy_bill asked
on
Medium Priority
1,439 Views
Last Modified: 2012-05-04
I have a (I hope) simple question. When doing a full backup ( and the database is in full recovery mode) is it neccessary to backup the transaction log file in a seperate job for restore purposes?
Comment
Watch Question

Top Expert 2004

Commented:
Do you want to have point in time recovery?  It's backing the transaction log up that gives you PIT restore ability.  Also, if you never backup the transaction log (and you're in full recovery mode) it will get huge...

If you decide you don't need to backup the log, switch the recovery mode to simple.

Commented:
If you are asking whether the full recovery mode automatically backs up the log files, the answer is no. Full recovery allows you to backup your transaction log. However, you do need to set up a job to do so.

You should probably set up a separate job so that you can set a specific time increment for the log file backups. The maintenance wizard will automatically create a separate job for you.

1) Determine or find what is an acceptable recovery. Does the business require a 24 hour or 1 hour recovery? If 24 hour recovery is sufficient for all of your databases, then you can change the mode to simple recovery.
2) Since you are asking about log file backups in full recovery mode, you may need to be ready to recover to the hour or sooner. In this case, you will set up your transaction log backups based on the recovery time required.

Let me know if you need any further clarification.

Author

Commented:
(now befuddled)

Ok, just so I get this straight, a full backup (we use Veritas 9.1) on a SQL database in full recovery mode) doesn't backup the transaction logs, thus a restore would be impossible in the event of a disaster? That's rather odd...anyways.

We require a one hour recovery, so therefore we to setup the log files to be backup up on what kinda schedule? One hour?
Top Expert 2004
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
rats, two jobs it is then. Veritas keeps telling me that they grab both the db and the trans logs on a full backup, guess they must be mistaken?
Top Expert 2004

Commented:
My opinion here, unless your databases are very large with lots of activity, it's easier to schedule your log backups within SQL Server and then dump them to tape.

We use veritas, but most of our servers we dump to disk and then to tape.

Commented:
First the database is backed up. Then the transaction logs are backed up hourly. On a restore the full backup is restored then each transaction log backup in sequence. You can set up your backups through the maintenance wizard. There you will designate the path for your backup files, the time interval etc...

This SQL maintenance should occur and be completed before the start of the Veritas backup. You will designate the folders that you wish to backup with Veritas, thereby having a copy of the database backups on file and on tape. This is the ideal way to configure your backup.

Author

Commented:
Yeah, try to convince my boss of that! You wouldn't have chapter and verse from the SQL BOL? :)
I am not a DBA, but I have worked with some sharp guys, and this is the way I have always seen it done...but I need some hard evidence. My boss is convinced that the daily db and trans logs backup are good enough, but based, on this info, I need to persuade him to run a transaction log backup hourly....and I assume that a hot backup of the trans log is OK and doesn't affect performance?

Commented:
This is just common practice throughout the industry. This is a logical argument based on how necessary the data really is. If you backup the db files to file and then to tape with Veritas backup exec, then you have double coverage. This protects you agains a catastrophic failure where you cannot retrieve the backup file from the hard disk. Having the backup file on the drive is convenient and you can manage the amount of days a file stays on the server through the maintenance wizard if you are concerned about disk space.

The load on your server depends on how much data you are processing. Some dbs may require a shorter interval because the transaction log grows quickly.

Here's a good link:
http://www.microsoft.com/technet/prodtechnol/sql/2000/books/c11ppcsq.mspx
Top Expert 2004

Commented:
Agree with the above.  We have many databases that we actually do 15minute transaction log backups on....All depends on how important your data is and how much you can afford to lose.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.