Solved

MS SQL backup and transaction log

Posted on 2004-04-12
10
1,384 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?
0
Comment
Question by:froggy_bill
  • 4
  • 3
  • 3
10 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 10809759
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.
0
 
LVL 1

Expert Comment

by:gcdba
ID: 10809890
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.
0
 

Author Comment

by:froggy_bill
ID: 10814520
(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?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 34

Accepted Solution

by:
arbert earned 500 total points
ID: 10814639
"doesn't backup the transaction logs, thus a restore would be impossible in the event of a disaster? "

Not impossible, but you would lose any transactions that occured from the beginning to the end of the backup....


"We require a one hour recovery, so therefore we to setup the log files to be backup up on what kinda schedule? One hour?"

Yes....
0
 

Author Comment

by:froggy_bill
ID: 10815932
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?
0
 
LVL 34

Expert Comment

by:arbert
ID: 10816024
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.
0
 
LVL 1

Expert Comment

by:gcdba
ID: 10820132
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.
0
 

Author Comment

by:froggy_bill
ID: 10820200
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?
0
 
LVL 1

Expert Comment

by:gcdba
ID: 10820337
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
0
 
LVL 34

Expert Comment

by:arbert
ID: 10824890
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.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question