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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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)...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.