473,837 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transaction Logging Backup Set

Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!
Jul 20 '05 #1
3 7580
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmai l.com> wrote in message
news:b8******** *************** ***@posting.goo gle.com...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #2
Hi!

This is very helpful. Thank you very much.

Could you tell me please why to truncate the transaction log
immediately after the full database backup command? What happens if I
need to recovery some of the transactions that were taking place
during the full database backup, for example? Would it be better to
do the truncate transaction log with the INIT immediately before the
full database backup takes place?

Many Thanks.

Thiko!

"Igor Raytsin" <n&*@cyberus.ca > wrote in message news:<3f******* *@news.cybersur f.net>...
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmai l.com> wrote in message
news:b8******** *************** ***@posting.goo gle.com...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #3
Hi,

There is some misunderstandin g here:

1. You do not need to truncate transaction log manually. Full Backup or
Transaction Log Backup will do it for you.
2. INIT option does not truncate log. INIT specifies that all backup sets
should be overwritten.
Regards,
Igor
"Thiko" <bi*****@hotmai l.com> wrote in message
news:b8******** *************** ***@posting.goo gle.com...
Hi!

This is very helpful. Thank you very much.

Could you tell me please why to truncate the transaction log
immediately after the full database backup command? What happens if I
need to recovery some of the transactions that were taking place
during the full database backup, for example? Would it be better to
do the truncate transaction log with the INIT immediately before the
full database backup takes place?

Many Thanks.

Thiko!

"Igor Raytsin" <n&*@cyberus.ca > wrote in message

news:<3f******* *@news.cybersur f.net>...
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmai l.com> wrote in message
news:b8******** *************** ***@posting.goo gle.com...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabas e backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLo gBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #4

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

Similar topics

10
13354
by: TZoner | last post by:
1) Can one find the location of the 'Transaction Log' at: <Hard Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? 2) Is it safe to delete it, as SQL will create a new Transaction Log when it realises none already exist? 3) When trying to do 2) I get error message that file is in use, even though SQL Server is closed. Any suggestions? 4) Can anyone shed light on the error message 'Write on ... <my path
0
2089
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the database on the backup server. Meanwhile, I leave the database ready to accept transaction log from the transaction log backup at noon daily. And I had used different restore options to test out the transaction that was being applied. And I couldn't...
4
2089
by: xo55ox | last post by:
Hi, Currently, I am on SQL2000 SP3 and Windows 2003. I am trying to restore the full database backup and transaction log backup on the development server. The full database restore is not a problem, but the transaction log restore happened during the day is. Everytime when I try to compare the transaction in the database (select the last update date from one of my table as a benchmark, then backup the transaction log for restore) to...
6
10332
by: Burkhard Schultheis | last post by:
As I wrote last week, we have a problem with a DB2 V8 on Linux. Here is what is in db2diag.log during online backup: Starting a full database backup. 2004-04-01-02.33.54.760164 Instance:lzgneu Node:000 PID:1293(db2loggw (TELEMATX)) TID:1024 Appid:none data protection sqlpgwlp Probe:909 TailPage 0 does not match pagelsn 0023CEBF0FFB and firstlsn 0023CEBF8000
20
19002
by: xixi | last post by:
i am using db2 udb v8.1 , so if parameter retain log records is off , i am assuing it use circular logging, in the doc it explains the log records fill the log files and then overwrite the initial log records in the initial log file, so if so, why we still have transaction log is full error complaint? but if the log never clean up, so isn't it will be problem that i have to keep increase the log file size, log files numbers? our...
9
7964
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
16
3834
by: DataPro | last post by:
New to Sql Server, running SQL Server 2000. Our transaction log file backups occasionally fail as the size of the transaction log gets really huge. We'd like to schedule additional transaction log backups. Does that require an exclusive on the database or can the db be used during a transaction log backup? Also, does switching to a bulk mode recovery model before a bulk operation then switching back to full recovery mode after present...
4
13227
by: yashgt | last post by:
Hi, We have created a SQL server 2000 database. We observe that the transaction log keeps growing over time. We are now about to run out of space. We have been periodically shrinking the database. Nevertheless the size has increased. I would imagine that a transaction log can be eliminated if we stop the database. Can that be done? Is there a way to completely wipe off the transaction log? Thanks,
3
2703
by: sifrah | last post by:
Hi All, My SQL server transaction log is getting bigger every day and my HDD if running out of space. So i follow the MS KB about how to Shrinking the Transaction Log. After doing so the log is much much smaller as i can see the size of it under enterprise manager. The problem is that the HDD still shows the same size. If i shrink the DB why the and reduce its size why the HDD does not
0
10582
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...
1
10638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9418
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...
0
7009
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
5677
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5859
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4480
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
4054
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.