How we implement our archive logging is fairly straight-forward. We have two
separate file systems that manage our archive logs. As the current log is
being written, it is written to /dblogs. Once that log is full, the userexit
is invoked and moves the log to a /bklog file system. These can then be
archived off to tape and either left on disk (which is what we do) or
removed if you do not have enough space to hold them.
During our backup (offline Sunday, online incremental monday through
Saturday), we issue the backup, then issue the "archive log for database
dbname" command (this command is only issued after the online incremental --
not needed for an offline). This will force the current log, associated with
the online incremental to be archived off. This is then written to tape.
We have enough space in our "backup directories" to hold one weeks worth of
backup and archive logs. After a successful offline backup on Sunday, we
remove all the log files and backups from the file systems (we retain them
on tape for 3 weeks).
You specify in the userexit your current logpath and the archive logpath, as
well as the audit path (contains the information about the status of the
userexits).
You can at any time, like oracle, issue archive log for database command and
write those to tape at any time (like Oracle). The only work you would lose
would be any transactions currently in flight.
In the event of a restore is needed, simply make sure your archive logs on
tape are restored to the archive logpath specified in the user exit.
-----Original Message-----
From: Joe Philip
[Email address protected]
Sent: Wednesday, May 19, 2004 2:58 PM
To: LazyDBA Discussion
Subject: newbie questions on archive logs
It seems like there are many newbie DB2 dbas like me here (mostly moved from
Oracle). In oracle, archive logging is different. You can issue a log switch
and then safely archive off all the logs which are older than the current
ones.
DB2 seems to be different. You are never sure which one you can archive
off - I am still learning the userexit stuff.
So, I would invite the DB2 experts in the list to send the answers on these
newbie transaction/archive logs to the list directly (instead of just
sending only to the original sender).
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe, e-mail: [Email address protected]
For additional commands, e-mail: [Email address protected]
*************************************************************
This message, including any attachments, may contain
confidential information intended for a specific individual
and purpose, and may be protected by law. If you are not
the intended recipient, please notify the sender by e-mail
or telephone immediately, and then immediately delete this
message. Any disclosure, copying or distribution of this
message, or the taking of any action based on it, by any
unintended recipient is strictly prohibited.
DB2 & UDB email list listserv db2-l LazyDBA home page