Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Auditing record changes

We have uploaded batch jobs that run during the day to insert/delete/update records in a keyed file. We've tried to add triggers to this file so that we can keep an audit trail of the changes. The problem is that sometimes we have approximately one million records that get updated/added by this day job. When we added the triggers it took very long to complete.

Here are the two approaches we took for the trigger program.

1. We created a COBOL program that added a record in the audit file.

2. We then created a CL program that wrote the before and after images to a data queue. At the end of the day, we copied the data from the data queue to the audit file.

The second approach was much faster than the first, but still it's not that fast.

I was wondering if there is a better approach to take.


OS/400 journals are really the best performing option for auditing record changes. The only way to really speed up a trigger program is to write the images to a data queue, which you've already done. Journaling is done at a much lower level in the system, so it's going to perform better than trigger auditing.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this Search400.com Featured Topic: Database issues resolved


This was last published in July 2003

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close