473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Transaction Logs

Hi.

I have a problem with many transaction logs generated by DB2 Version
7.2 on Redhat 7.3.

Log file size (4KB) (LOGFILSIZ) = 1000
Number of primary log files (LOGPRIMARY) = 25
Number of secondary log files (LOGSECOND) = 25
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 100
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
I know that the Logs are generated every time a PERL-script starts and
perfomrs some operations on the database. This script syncronizes the
contents of tables with tables from a different DB and uses DB2
federated System features to access them.
The LOGFILES have most the time a size of 16384 bytes. I guess in this
case no data changed.

Please could you help me with 3 question about this:

1) When is a new LOGFILE generated in DB2 or when does a LOG-Switch
occur.
2) How can i prevent DB2 generating those LOGFILES.
3) Is there some tool available that shows the contents of the LOGFILE

Is there perhaps some good documentation available for this questions?

Thanks
Wolfgang
Nov 12 '05 #1
2 6182
Your logfiles (25 primary) are allocated and opened at first connect or
activate db command.
A log file is closed at whatever size (your 16k which is two pages)
whenever a db2 archive log command is issued or caused to be issued by db2.
DB2 will start to open new log files on demand when your ten primaties
have been used and will keep on doing so until the db is deactivatd.
Then it will start anew by allocating 10 empty primaries, fill them up,
then start allocating, one by one, on demand new log files.
DB2 will switch to a new log when the one currrently used fills up, or
id a db2 archive log command is issued.
Bear in mind that db2 archive log command makes sense when the userexit
is activated.

Obviously, something in your PERL scripts does not acticvate the db and
becomes the sole connection to the db. Should the script connect reset,
then the db is in disconnected state and log files are closed. The on
in use is chopped at its end (your 16K) and the others stay assigned,
empty waiting for the next connect or activate; and so on....

I'd try to issue an activate command and then deactivate the db when you
the dba needs to take it offline. This way logs will stay assigned and
ready for whenever you run your scripts.
HTH, Pierre.

Wolfgang B. wrote:
Hi.

I have a problem with many transaction logs generated by DB2 Version
7.2 on Redhat 7.3.

Log file size (4KB) (LOGFILSIZ) = 1000
Number of primary log files (LOGPRIMARY) = 25
Number of secondary log files (LOGSECOND) = 25
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 100
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
I know that the Logs are generated every time a PERL-script starts and
perfomrs some operations on the database. This script syncronizes the
contents of tables with tables from a different DB and uses DB2
federated System features to access them.
The LOGFILES have most the time a size of 16384 bytes. I guess in this
case no data changed.

Please could you help me with 3 question about this:

1) When is a new LOGFILE generated in DB2 or when does a LOG-Switch
occur.
2) How can i prevent DB2 generating those LOGFILES.
3) Is there some tool available that shows the contents of the LOGFILE

Is there perhaps some good documentation available for this questions?

Thanks
Wolfgang


--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot net
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
Nov 12 '05 #2
Great.
That is the problem and what i needed to know about Logging. Files
with the size of 16K are created by truncating the Logfiles to its
actual size of 16K during reconnection.
With this information, I am able to solve the problem.

The Logs are moved by another program not using USEREXIT.

Thank you very much Pierre.

Wolfgang

Pierre Saint-Jacques <se*****@attglobal.net> wrote in message news:<41**************@attglobal.net>...
Your logfiles (25 primary) are allocated and opened at first connect or
activate db command.
A log file is closed at whatever size (your 16k which is two pages)
whenever a db2 archive log command is issued or caused to be issued by db2.
DB2 will start to open new log files on demand when your ten primaties
have been used and will keep on doing so until the db is deactivatd.
Then it will start anew by allocating 10 empty primaries, fill them up,
then start allocating, one by one, on demand new log files.
DB2 will switch to a new log when the one currrently used fills up, or
id a db2 archive log command is issued.
Bear in mind that db2 archive log command makes sense when the userexit
is activated.

Obviously, something in your PERL scripts does not acticvate the db and
becomes the sole connection to the db. Should the script connect reset,
then the db is in disconnected state and log files are closed. The on
in use is chopped at its end (your 16K) and the others stay assigned,
empty waiting for the next connect or activate; and so on....

I'd try to issue an activate command and then deactivate the db when you
the dba needs to take it offline. This way logs will stay assigned and
ready for whenever you run your scripts.
HTH, Pierre.

Wolfgang B. wrote:
Hi.

I have a problem with many transaction logs generated by DB2 Version
7.2 on Redhat 7.3.

Log file size (4KB) (LOGFILSIZ) = 1000
Number of primary log files (LOGPRIMARY) = 25
Number of secondary log files (LOGSECOND) = 25
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 100
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
I know that the Logs are generated every time a PERL-script starts and
perfomrs some operations on the database. This script syncronizes the
contents of tables with tables from a different DB and uses DB2
federated System features to access them.
The LOGFILES have most the time a size of 16384 bytes. I guess in this
case no data changed.

Please could you help me with 3 question about this:

1) When is a new LOGFILE generated in DB2 or when does a LOG-Switch
occur.
2) How can i prevent DB2 generating those LOGFILES.
3) Is there some tool available that shows the contents of the LOGFILE

Is there perhaps some good documentation available for this questions?

Thanks
Wolfgang

Nov 12 '05 #3

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

Similar topics

7
by: enigma | last post by:
Just wondering if you could help me on this one. I'm not sure if my transaction logs are behaving oddly or what. I've successfuly managed to shrink my transaction logs from 7GB down to 1MB and now...
3
by: Thiko | last post by:
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...
0
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...
3
by: Andrew S. | last post by:
I recently performed an SQL server 2000 installation. Other than placing the program files on C: and data on D:, I saw no option to install transaction logs in an alternate location. What is...
7
by: Abdul-Wahid Paterson | last post by:
Hi, I have had a site working for the last 2 years and have had no problems until at the weekend I replace my database server with a newer one. The database migration went like a dream and I had...
2
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...
3
by: TG | last post by:
Coming from a (mostly) Oracle shop, I am unclear how SS transaction logs work as far as up to point of failure recovery goes. I have the few MSSQL databases I look after in full recovery mode,...
1
by: JA | last post by:
Hi, I know just about nothing about SQL Server. I am getting this error: The log file for database 'my_database' is full. Back up the transaction log for the database to free up some log space. ...
3
by: Laurence | last post by:
Hi folks, How to remove the transaction logs which are out of date in HADR environment? DB2 command PRUNE, it can only run on primary database but cannot run on standby database. Because the...
4
by: Brian D | last post by:
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
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.