How to clean-up DB2 Log?

Yosia Widi Nugroho

How to clean-up DB2 Log?
Dear All,

Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory? Thank you.

regards,
Yosia.



Cheers,
Yosia W. Nugroho



[login to unmask email]

Re: How to clean-up DB2 Log?
(in response to Yosia Widi Nugroho)
Yosia,

The db2uext2 user exit will archive log files once they are full and when
all transactions contained within have been externalized to the physical
database. Once the log file has been archived (to ADSM, for instance), it
will delete the log file from the SQLOGDIR directory. We've been using
this in our shop with great success.

Refer to Appendix G of the "Administration Guide: Design and
Implementation" for information about using the user exit for archiving and
retrieving log files.

Bill Gallagher, DBA
Phoenix Home Life
Enfield, CT 06083




Yosia Widi
Nugroho To: [login to unmask email]
<[login to unmask email] cc:
N.NET.ID> Subject: How to clean-up DB2 Log?
Sent by: DB2
Data Base
Discussion
List
<[login to unmask email]
OM>


01/05/01
12:32 AM
Please
respond to
DB2 Data Base
Discussion
List






Dear All,

Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory?
Thank you.

regards,
Yosia.



Cheers,
Yosia W. Nugroho








Scott Hayes

Re: How to clean-up DB2 Log?
(in response to BILL_GALLAGHER@PHL.COM)
Yosia,

"Clean-up" would only be needed if you're doing archive logging,
and you need to be careful of which files you get rid of. Do not
put yourself into an unrecoverable state. Bill Gallagher's answer
had some very good comments. Also, to help understand the relationship
between backups, logs, and restores, please see a white paper on
our web site: http://www.database-guys.com/backrec.html

Cheers,
Scott

Scott Hayes, Database-GUYS Inc.
Precision Performance Monitoring and Tuning Tools for IBM DB2 UDB UNIX.
http://www.database-guys.com/story.shtml

Yosia Widi Nugroho <[login to unmask email]> wrote in message news:
<[login to unmask email]>...
> Dear All,
>
> Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory? Thank you.
>
> regards,
> Yosia.
>
>
>
> Cheers,
> Yosia W. Nugroho
>
>
>



[login to unmask email]

Re: How to clean-up DB2 Log?
(in response to Endy Lambey)
Endy,

db2uext2 is not a command to be executed . . . it is the name of the user
exit that is invoked when you have the "userexit=1" db cfg parm set. There
is documentation of setting up this exit in Appendix G of the
"Administration Guide: Design and Implementation".

Information on using the exit under NT is lacking in the guide, so I'm not
sure what your options would be.

Bill Gallagher, DBA
Phoenix Home Life
Enfield, CT 06083




Endy Lambey
<[login to unmask email] To: [login to unmask email]
ANA.CO.ID> cc:
Sent by: DB2 Data Subject: Re: How to clean-up DB2 Log?
Base Discussion
List
<[login to unmask email]>


01/08/01 07:07 PM
Please respond to
Endy Lambey






Dear Bill,

I am in the same team with Yosia. Thank you for your information.
But we cannot find the db2uext2 command on our DB2, we're using DB2 5.2 on
NT.
We've tried to delete the contents of SQLOGDIR, and the database works fine
now, but we still don't know whether there are "danger zones" that we
haven't encountered or we should be aware of.
FYI, on our db paramater configuration, Logretain=1 Userexit=0.

*********** REPLY SEPARATOR ***********

On 1/5/2001 at 9:27 AM [login to unmask email] wrote:

>Yosia,
>
>The db2uext2 user exit will archive log files once they are full and when
>all transactions contained within have been externalized to the physical
>database. Once the log file has been archived (to ADSM, for instance), it
>will delete the log file from the SQLOGDIR directory. We've been using
>this in our shop with great success.
>
>Refer to Appendix G of the "Administration Guide: Design and
>Implementation" for information about using the user exit for archiving
and
>retrieving log files.
>
>Bill Gallagher, DBA
>Phoenix Home Life
>Enfield, CT 06083
>
>
>
>
> Yosia Widi
> Nugroho To: [login to unmask email]
> <[login to unmask email] cc:
> N.NET.ID> Subject: How to clean-up DB2
Log?
> Sent by: DB2
> Data Base
> Discussion
> List
> <[login to unmask email]
> OM>
>
>
> 01/05/01
> 12:32 AM
> Please
> respond to
> DB2 Data Base
> Discussion
> List
>
>
>
>
>
>
>Dear All,
>
>Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory?
>Thank you.
>
>regards,
>Yosia.
>
>
>
>Cheers,
>Yosia W. Nugroho
>
>
>
>
>
>
>
>




Best Regards


Endy Lambey
Software Engineer
PT. MITRA INFOSARANA
[login to unmask email]
[login to unmask email]
[login to unmask email]








Scott Saunders

Re: How to clean-up DB2 Log?
(in response to BILL_GALLAGHER@PHL.COM)
Bill is correct. the db2uext2 is a C program (at least in Unix) usually
found in the DB2 install directory (the location may be release dependent).
The instructions for customizing the C program are included as comments
within the code. There are usually three versions, one to copy the logs to
disk, one to tape and one to ADSM. The instructions for the disk version,
the only one I have used, are straight-forward. You will need a C compiler
on the server.

HTH,

Regards,
Scott Saunders
Siebel Systems, Inc.

Opinions expressed are my own and not those of my employer.


-----Original Message-----
From: [login to unmask email] [mailto:[login to unmask email]
Sent: Monday, January 08, 2001 6:43 AM
To: [login to unmask email]
Subject: Re: How to clean-up DB2 Log?


Endy,

db2uext2 is not a command to be executed . . . it is the name of the user
exit that is invoked when you have the "userexit=1" db cfg parm set. There
is documentation of setting up this exit in Appendix G of the
"Administration Guide: Design and Implementation".

Information on using the exit under NT is lacking in the guide, so I'm not
sure what your options would be.

Bill Gallagher, DBA
Phoenix Home Life
Enfield, CT 06083




Endy Lambey
<[login to unmask email] To: [login to unmask email]
ANA.CO.ID> cc:
Sent by: DB2 Data Subject: Re: How to
clean-up DB2 Log?
Base Discussion
List
<[login to unmask email]>


01/08/01 07:07 PM
Please respond to
Endy Lambey






Dear Bill,

I am in the same team with Yosia. Thank you for your information.
But we cannot find the db2uext2 command on our DB2, we're using DB2 5.2 on
NT.
We've tried to delete the contents of SQLOGDIR, and the database works fine
now, but we still don't know whether there are "danger zones" that we
haven't encountered or we should be aware of.
FYI, on our db paramater configuration, Logretain=1 Userexit=0.

*********** REPLY SEPARATOR ***********

On 1/5/2001 at 9:27 AM [login to unmask email] wrote:

>Yosia,
>
>The db2uext2 user exit will archive log files once they are full and when
>all transactions contained within have been externalized to the physical
>database. Once the log file has been archived (to ADSM, for instance), it
>will delete the log file from the SQLOGDIR directory. We've been using
>this in our shop with great success.
>
>Refer to Appendix G of the "Administration Guide: Design and
>Implementation" for information about using the user exit for archiving
and
>retrieving log files.
>
>Bill Gallagher, DBA
>Phoenix Home Life
>Enfield, CT 06083
>
>
>
>
> Yosia Widi
> Nugroho To: [login to unmask email]
> <[login to unmask email] cc:
> N.NET.ID> Subject: How to clean-up DB2
Log?
> Sent by: DB2
> Data Base
> Discussion
> List
> <[login to unmask email]
> OM>
>
>
> 01/05/01
> 12:32 AM
> Please
> respond to
> DB2 Data Base
> Discussion
> List
>
>
>
>
>
>
>Dear All,
>
>Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory?
>Thank you.
>
>regards,
>Yosia.
>
>
>
>Cheers,
>Yosia W. Nugroho
>
>
>
>
>
>
>
>




Best Regards


Endy Lambey
Software Engineer
PT. MITRA INFOSARANA
[login to unmask email]
[login to unmask email]
[login to unmask email]













Endy Lambey

Re: How to clean-up DB2 Log?
(in response to Scott Hayes)
Dear Bill,

I am in the same team with Yosia. Thank you for your information.
But we cannot find the db2uext2 command on our DB2, we're using DB2 5.2 on
NT.
We've tried to delete the contents of SQLOGDIR, and the database works fine
now, but we still don't know whether there are "danger zones" that we
haven't encountered or we should be aware of.
FYI, on our db paramater configuration, Logretain=1 Userexit=0.

*********** REPLY SEPARATOR ***********

On 1/5/2001 at 9:27 AM [login to unmask email] wrote:

>Yosia,
>
>The db2uext2 user exit will archive log files once they are full and when
>all transactions contained within have been externalized to the physical
>database. Once the log file has been archived (to ADSM, for instance), it
>will delete the log file from the SQLOGDIR directory. We've been using
>this in our shop with great success.
>
>Refer to Appendix G of the "Administration Guide: Design and
>Implementation" for information about using the user exit for archiving
and
>retrieving log files.
>
>Bill Gallagher, DBA
>Phoenix Home Life
>Enfield, CT 06083
>
>
>
>
> Yosia Widi
> Nugroho To: [login to unmask email]
> <[login to unmask email] cc:
> N.NET.ID> Subject: How to clean-up DB2
Log?
> Sent by: DB2
> Data Base
> Discussion
> List
> <[login to unmask email]
> OM>
>
>
> 01/05/01
> 12:32 AM
> Please
> respond to
> DB2 Data Base
> Discussion
> List
>
>
>
>
>
>
>Dear All,
>
>Does anyone know how to clean-up the DB2 log files on SQLOGDIR directory?
>Thank you.
>
>regards,
>Yosia.
>
>
>
>Cheers,
>Yosia W. Nugroho
>
>
>
>
>
>
>
>




Best Regards


Endy Lambey
Software Engineer
PT. MITRA INFOSARANA
[login to unmask email]
[login to unmask email]
[login to unmask email]



Ulrich KUHN

Re: How to clean-up DB2 Log?
(in response to Scott Saunders)
Endy,

as Bill and Scott have pointed out, db2uext2 is a program, not a command.
However, if you decide to stick to the manual approach rather than using the
user exit, yes, there is a danger zone: if you delete any log files from the
"first active log file" onwards, you will be in serious trouble. You can
find out the first active log file in the database configuration (do a "get
db cfg for xxxx").

In addition to that, if you ever need to recover the database from a backup
to the current point, you will need to keep all logs since that backup (for
the rollforward). And in case there is a problem with that backup, you
might need to go back to the previous backup, in which case you will need
all logs since the previous backup....

Cheers,
Ulrich

> -----Original Message-----
> From: Endy Lambey [SMTP:[login to unmask email]
> Sent: Tuesday, January 09, 2001 11:07 AM
> To: [login to unmask email]
> Subject: Re: How to clean-up DB2 Log?
>
> Dear Bill,
>
> I am in the same team with Yosia. Thank you for your information.
> But we cannot find the db2uext2 command on our DB2, we're using DB2 5.2 on
> NT.
> We've tried to delete the contents of SQLOGDIR, and the database works
> fine
> now, but we still don't know whether there are "danger zones" that we
> haven't encountered or we should be aware of.
> FYI, on our db paramater configuration, Logretain=1 Userexit=0.
>