Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3885
  • Last Modified:

Disable DB2 Logging

We have an ERP system, which has a logging utility for audit purposes.
Every INSERT, UPDATE and DELETE is logged into its log table with for example username and date information.
This process adds some overhead to running system.
Also DB2 logs our log process too.
How can I disable DB2 log for our ERP system log?
I hope to increase performance in this way since
log table is getting bigger every day.
1 Solution
you can't basically , and anyway the logs are for different purposes, don't confuse them

you log you activity against the tables to provide an audit trail of business transactions....
this type of log is typically required for 5-7years for Legal reasons, to satisfy your accountants that your internal processes are rigorous and can be used to detect fraud...  

db2 logs your transactions to ensure that it can provide a recovery solution in the event of  database/hardware problems which maybe encountered during normal operation. This type of log is normally kept for months at most as part of your general backup/recovery (& disater recovery) procedures.  You do not normally attempt to process these logs yourself.


You can use the ALTER NOT LOGGED INITAILLY facility of the tables to stop db2 logging
database/table activity for the table , but this is only really intended for the bulk loading of data to your tables for which you intended to take a full backup after the event anyway. The scope of the NOT LOGGED is for the current transaction only... Use of NOT logged is dangerous as any errors encountered during its scope cannot be recovered by DB2 and so the whole tables(s) will be lost (have to be recreated from scratch)...

Kent OlsenData Warehouse Architect / DBACommented:

Let me second lowfatspread's comment and throw in another thought.

ERP's are big, massive, inefficient "be everything to everyone" kinds of applications.  There are entirely too many moving parts for any one person to know everything that's going on within one of them.  Don't take dangerous steps with an ERP thinking that if the worst happens, you're only going to effect a small portion of the system.

If you've got a performance problem with one (and every ERP experiences them at some point), get a GOOD DB2/UDB systems programmer to tune up the database or buy some more hardware.  And get used to the idea of "buy more hardware".  I'm convinced that ERP's were invented to help meet sale's quotas in this day of declining mainframes.

lol kdo
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

of course, if you would like to be brave, drop the triggers that create the transaction logging, or stop db2's audit facility, however I would check with management first before doing this, unless 20 years in prison appeals to you.
If you do get the go ahead, make sure you have some written document signed by somebody who is AUTHORIZED TO SIGN THE DOCUMENT. normally this would be the firm that handles the companys audit or senior management level, ie CFO or CIO or CEO.
If your problem is performance related, could you state what level of performance you see has been degraded?
ileventAuthor Commented:
This is what I want;
thanks for any comment.
Kent OlsenData Warehouse Architect / DBACommented:
Hi ilevent,

Use caution here.  The "NOT LOGGED INITIALLY" phrase applies only to the next update/transaction.  It's not intended for "general" use.


if you rollback the transaction implicitly or because of some error, the table can only be dropped, so I would be careful in using this. Make sure that you always have a very recent backup of the database in case something should go wrong.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now