[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1408
  • Last Modified:

MS SQL backup and transaction log

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
froggy_bill
Asked:
froggy_bill
  • 4
  • 3
  • 3
1 Solution
 
arbertCommented:
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
 
gcdbaCommented:
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
 
froggy_billAuthor 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?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
arbertCommented:
"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
 
froggy_billAuthor 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?
0
 
arbertCommented:
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
 
gcdbaCommented:
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
 
froggy_billAuthor 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?
0
 
gcdbaCommented:
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
 
arbertCommented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now