473,471 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Archive logs?

Hi,

we have an application which uses online backups, so archive logging
is a requirement. We have a small/moderate size database (a few
hundred megabytes isn't much by today's standards) with relatively low
insert/update activity (a few thousand per day).

How should I set up archive logging (number of primary and secondary
logs files, size of each log file)?

Also, we set log archiving to manual. What log files are safe to
archive? Currently we create an online backup every day at 2:00 AM
(the backup includes log files), keep the last 10 such backups, and
delete all log files older than the oldest backup.

The backup command is
BACKUP DB mydata TO d:\db2_backup COMPRESS UTIL_IMPACT_PRIORITY 1
INCLUDE LOGS

Logging is set up as
UPDATE DB CFG FOR mydata USING logarchmeth1 LOGRETAIN logprimary 16
logsecond 240 logfilsiz 4096 newlogpath d:\db2_logs

It is my understanding that this sets up 16 files, 16 MB each, for a
total of 256 MB, with the possibility to go up to a total of 256
files, or 4 GB, but only if needed (the application is installed at
multiple remote servers whom we cannot access every day, so I thought
this would be on the safe side). In 10 days, the logs files use up
about 20 GB. What do you recommend to keep the size lower? Is it safe
to remove all log files older than the youngest backup? Should I
change logfilesiz or logprimary/logsecond?

TIA,
Kofa
Jun 27 '08 #1
3 3736
"Kofa" <ko*******@gmail.comwrote in message
news:40**********************************@b64g2000 hsa.googlegroups.com...
Hi,

we have an application which uses online backups, so archive logging
is a requirement. We have a small/moderate size database (a few
hundred megabytes isn't much by today's standards) with relatively low
insert/update activity (a few thousand per day).

How should I set up archive logging (number of primary and secondary
logs files, size of each log file)?

Also, we set log archiving to manual. What log files are safe to
archive? Currently we create an online backup every day at 2:00 AM
(the backup includes log files), keep the last 10 such backups, and
delete all log files older than the oldest backup.

The backup command is
BACKUP DB mydata TO d:\db2_backup COMPRESS UTIL_IMPACT_PRIORITY 1
INCLUDE LOGS

Logging is set up as
UPDATE DB CFG FOR mydata USING logarchmeth1 LOGRETAIN logprimary 16
logsecond 240 logfilsiz 4096 newlogpath d:\db2_logs

It is my understanding that this sets up 16 files, 16 MB each, for a
total of 256 MB, with the possibility to go up to a total of 256
files, or 4 GB, but only if needed (the application is installed at
multiple remote servers whom we cannot access every day, so I thought
this would be on the safe side). In 10 days, the logs files use up
about 20 GB. What do you recommend to keep the size lower? Is it safe
to remove all log files older than the youngest backup? Should I
change logfilesiz or logprimary/logsecond?

TIA,
Kofa
I would recommend that you use LOGARCHMETH1 for log archiving.
Jun 27 '08 #2
On máj. 11, 04:31, "Mark A" <nob...@nowhere.comwrote:
I would recommend that you use LOGARCHMETH1 for log archiving.
Could you please elaborate on that?
According to the docs, an archived log file may be renamed and reused.
Should I use a LOGARCHMETH1 like
DISK:some-path? Would that result in unused (not active) logs files
being copied to some-path, and then reused? Or could I supply a user
exit that 'archives' log files by deleting them?

TIA,
Kofa
Jun 27 '08 #3
"Kofa" <ko*******@gmail.comwrote in message
Could you please elaborate on that?
According to the docs, an archived log file may be renamed and reused.
Should I use a LOGARCHMETH1 like
DISK:some-path? Would that result in unused (not active) logs files
being copied to some-path, and then reused? Or could I supply a user
exit that 'archives' log files by deleting them?
The syntax you would probably want to use is DISK:/path... The archive logs
will automatically be copied from the active log path to that path specified
in the LOGARCHMETH1 parm. You do not need any exit program if you use this
parm.

It is always possible that an archived log file might need to be used. For
example if you needed to restore from a backup and roll forward the logs.

You will need to manually purge the archive logs (unless you have Version
9.5) via a cron script (an exit program is not needed). You will want to
keep the archive logs at least until before the last backup (so you can roll
the logs forward from the backup time to the current time or end of logs),
and maybe longer if you need to ever restore the next-to-last backup and
then roll forward.
Jun 27 '08 #4

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

Similar topics

1
by: rajdb2 | last post by:
hello friends, I have to develop a script to archive logs to disk and then use tsm to back them up to tape. can somebody help me with this? thanks raj
1
by: mahr | last post by:
Hello, is there a way (Win 2003, DB2 UDB 8.1 Fixpack9), that the logs are archived regularly? Our server writes logs (-> archive logs) only 1-3 times per day. I would like to have them more...
2
by: Snonck | last post by:
Is is possible to recover deleted rows from a table from archive logs? For example, say you have a database with archive logging turned off. You create a table and populate it with records. You...
4
by: madzambonis | last post by:
Here is the situation.... We have Primary Server A linked to Standby Server B via HADR. Primary Server A has recently installed LOGARCHMETH1 to archive logs and a 2nd homegrown script that...
1
by: nevsoft | last post by:
Hello I have Oracle 10.2.0.1 on Solaris 10g. I want to make level0 incremental backup every night and level1 incremental backup during the day. Each level0 backup will be copied over network...
0
by: shorti | last post by:
We are running DB2 UDB 8.1 fp 14 on AIX using archival logging and online backups. I was running some disaster tests and found my database restore was not restoring to the latest active log. ...
5
by: daitaravi2002 | last post by:
Dear All, I am new to this Forum, what my prob in ORACLE 8I i have primary database i am trying to put all the data in test database which was not in network for that i am using archive logs. ...
0
by: victor deng | last post by:
I find the following url which says: "The log must be an archive log so that the log file will not be reused by the source database before the Capture program can read the log." ...
0
by: victor deng | last post by:
we are running a sql replication between two db2 v8 server on aix platform. And Sometimes,the capture server stopped because archive logs have been backuped by tsm(we backup archive logs use tsm...
0
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,...
0
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...
1
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...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
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.