Gurcan Orhan's Oracle Data Integrator Blog

05.12.12

Archiving ODI logs

Filed under: Oracle Data Integrator — gurcanorhan @ 14:05
Tags: , ,

Have you ever had the problem of lots of logs in ODI listing Operator. What would you think if there is a method to archive logs and you can store them as much as you want and can select anytime you want to?

I want to mention that since you are making changes in your work repository environment make sure you have your backups, exports, etc. These are my personal experiences and will take no responsibility for your development/data/work loss.

ODI stores logs in work repository, including variable history, in 12 tables. First create these tables with prefix “ARC_” to a different schema. I suggest you not to create any referential integrity constraints, foreign keys, indexes or constraints for these tables.

1. Generate the create table script, rename table and schema name, delete everything except CREATE TABLE script. Do not create indexes, foreign keys, constraints or other database objects for those tables.

2. Reverse both SOURCE and TARGET tables in ODI model.

3. Create a variable to store how many days you want to (this could be in a parameter table or maybe static). In this example I will use variable with name #V_Purge_Log_Retention.

4. Create interface for each of them regarding the filters and joins related to table below. (Click to enlarge picture)

ArchiveODILogs#1

5. Prepare a ODI procedure that will delete tables in order, shown below (click to enlarge picture). Remember, because of the referential integrity in ODI Repository, you need to send delete statements to database into right order. Otherwise, you might receive a referential integrity error or lose unexpected data.

ArchiveODILogs#2

6.Pack these stuff up shown below (click to enlarge picture). All the scenarios starting with “I_ARC” are in “Asynchronous Mode”. If any of the scenarios fail, exception is generated. You may take a look throwing exceptions in ODI in my other post named “ODI Alert Mechanism“.

ArchiveODILogs#3

That’s it. If you are able to do these things in right sequence, your ODI logs are in secure in your “ARC_” tables.

About these ads

3 Comments »

  1. Nice article, the queries (joins and filters) are very helpful. That’s the tricky part since there is no doc available for the workrepository.
    Thanks !

    Comment by Jérôme Françoisse (@JeromeFr) — 05.12.12 @ 15:53 | Reply

    • What I share is not commercially published by Oracle, those are all my personal experiences. It works fine with ODI 10G and you need to be careful in using it and/or it is your own responsibility to use. :-)
      I’ll post the 11G version as soon as I upgrade my ODI implementations to 10G.

      Comment by gurcanorhan — 05.12.12 @ 16:33 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 289 other followers

%d bloggers like this: