Solved

MS SQL backup and transaction log

Posted on 2004-04-12
10
1,368 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now