473,748 Members | 8,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does a Full Backup include transaction logs

In MS SQL 2005 when you do a Full Backup does it also backup and
truncate the transaction logs or do I need to back the transaction
logs up separately?

Thanks.
Brian

Jul 12 '07 #1
4 18233
Brian D (bd*******@yaho o.com) writes:
In MS SQL 2005 when you do a Full Backup does it also backup and
truncate the transaction logs or do I need to back the transaction
logs up separately?
You need to backup the transaction log separately. The rationale is that
the last recent backup may have gone lost, or be broken. If the log
backups are OK (and you saved them), you can recover from an older
full backup + the translog backups.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 12 '07 #2
Erland,

We do a full backup daily at 6pm. If we do a trans log backup 4 times
a day at 12 am, 6am, 12pm and 6pm, should the 6pm trans log be
immediately before or after the full backup or can we just skip the
6pm one all together? If I skip the 6pm trans log backup should I
truncate the log immediately after the full backup?

Brian

Jul 12 '07 #3
Brian,

If you want to save a little bit of backup space, run the 6pm log backup
just before the full backup. If you run it after, you will have backed up
the 12pm-6pm log activities twice.

Do NOT truncate the log ever, if you want to be able to restore the full
backup and then apply the logs to the full backup. If you were to backup
the database, then truncate the 6pm logs, the 12am, 6am, 12pm log backups
are all useless, since there is an unbridgeable transaction log gap between
the full backup and the first log.

RLF

"Brian D" <bd*******@yaho o.comwrote in message
news:11******** **************@ d55g2000hsg.goo glegroups.com.. .
Erland,

We do a full backup daily at 6pm. If we do a trans log backup 4 times
a day at 12 am, 6am, 12pm and 6pm, should the 6pm trans log be
immediately before or after the full backup or can we just skip the
6pm one all together? If I skip the 6pm trans log backup should I
truncate the log immediately after the full backup?

Brian

Jul 12 '07 #4
Brian D (bd*******@yaho o.com) writes:
We do a full backup daily at 6pm. If we do a trans log backup 4 times
a day at 12 am, 6am, 12pm and 6pm, should the 6pm trans log be
immediately before or after the full backup or can we just skip the
6pm one all together? If I skip the 6pm trans log backup should I
truncate the log immediately after the full backup?
First ask yourself: if the database goes belly-up, how much can we afford
to lose? In the case, the database file goes bad, there is a possibility
to take a final backup of the log. But if the log file disappears, this
means that you could lose up almost six hours of work. Can you afford
that?

No, that is it not a leading question. There are businesses where even
the loss of five minutes of data is a disaster. And there are businesses
where a full backup once a night without log backup is perfectly sufficient.
I just want you to evaluate where you fit in. Taking log backups as rarely
as you do, appears a bit unusual, so it might be that your business is
content with restoring the backup from last night. In which case, dealing
with the log is just extra overhead for you. For the rest of the post I will
nevertheless assume that this six-hour window is right for you.

I can't see that it matter whether you back up the log before or after
the full backup, but you should back up the log sometime there. In a
way log backups and full backups are independent of each other.

Russell mentioned that you should never truncate the transaction log.
I like to point out another thing. Where do you write the transaction log
dumps? Do you append them to the same device? Do you ever use WITH INIT?
Here is something to be careful with so that you don't lose part of a
log chain.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1570
by: Burt | last post by:
My company needs to move a 30 Gig SQL Server across the country as soon as possble on July 1. Turns out moving the full db across the network takes a few hours. I'd like to move a full copy of db a week ahead of time, and then just move either a differential backup(s) or transaction log with with the week's new data on July 1. Can anyone suggest the best strategy for doing this? Currently we're doing a differential backup each hour on...
9
7963
by: Balaji | last post by:
Hi, I got a problem while loading a table on DB2 database. It is saying that transation log is full and do more commits in between. Is it done by a DB2 or can I fix this at BD2 server? Thanks in advance, Katta
6
11557
by: paul | last post by:
Hi, i made an attempt to restore a online backup made with include logs option. But when i rollforward the db, i can't pout it online because it always ned log file. I tried the option to rollforward to end of logs and to point in time. In the doc, it is said taht with 'include logs', i can restore without any log file. Someone know how can i stop the rollforward pending status ? regards
5
2767
by: kaissoun | last post by:
despite the disk is not full but i have this message :Media controller -- Disk full encountered
5
1940
by: Gladiator | last post by:
Hai..... I have a database............ i took an online backup for tht..... After tht mistakenly i dropped the database.......... now i dont have the logs also....... now after i restore the database it will be in rollforward pending state........ when i am rollforwarding it is saying cannot rollforward........ can anyone tell me how to bring the database back again........
1
1869
by: Asphalt Blazer | last post by:
Hi, I have an ODS for which I need to do a full online backup. It is taking us 1 hour and 44 minutes to do this. The command is below: db2 "backup database $DBNAME ONLINE to $DBPATH with 4 buffers buffer 4096 parallelism 2 compress include logs without prompting" Well I want to bring it down to an hour atleast because this backup is encroaching on our other scheduled jobs. So I was planning to do this
2
3238
by: francois1 | last post by:
I am running a website with a SQL Server database attached. My transaction logs are full and my hosting co. won't allocate more disk space for me. I need to delete my database transaction logs and asume I will need to run an SQL script to do this. Problem: I do not have MS Enterprise Manager of any database utility on my website apart from MS Access. Where can I download a free SQL tool that I can use to delete the transaction logs...
5
3622
by: Konstantin Andreev | last post by:
Hello, all. I can't figure out <subjectfrom documentation. I had configured LOGARCHMETH1 = DISK:/bak/logs so all full log files are copied *out* of the active log path. Let I issue | # DB2 BACKUP DB MYDB ONLINE TO '/bak/images'
5
2722
by: aj | last post by:
SQL Server SP2 9.0.3042 64-bit I recently put my first SQL Server DB in production. In the "other" database that I use (not interested in any arguments), you can indicate the desired size of your transaction logs. When the current log reaches that size, it gets backed up (or whatever you have configured to happen). Certain events in the database might cause the logs to get prematurely "cut" at a particular time, but the logs are for...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.