21.3.08

Adding Oracle ODI Agent execution under OPMN control

I was talking to a customer and explaining opmn and it's role acting as main process control for OracleAS and custom components. While talking also about Oracle Data Integrator (ODI) agents and how to start them up, it occured to my mind to test how to place agent startup/shutdown under opmn control.

Adding your own scripts and executables under opmn control as part of the whole OracleAS package is supported and described in the OPMN manual.

Here is how it goes when adding ODI Agent:

Modify and edit following XML fragment and paste it on $ORACLE_HOME/opmn/conf/opmn.xml

....

<ias-component id="OdiAgent" status="enabled" id-matching="false">
    <environment>
       <variable id="ODI_JAVA_HOME"
                 value="D:\product\10.1.3.1\OracleAS_1\jdk" append="false"/>
       <variable id="ODI_HOME"
                 value="D:\product\odiclient\oracledi" append="false"/>
    </environment>
    <process-type id="OdiAgent" module-id="CUSTOM">
       <process-set id="OdiAgent" restart-on-death="true" numprocs="1">
          <module-data>
             <category id="start-parameters">
                <data id="start-executable" value="D:\product\odiclient\oracledi\bin\agent.bat"/>
                <data id="start-args"
                      value="-PORT=20900 -NAME=MYAGENT"/>
             </category>
             <category id="stop-parameters">
                <data id="stop-executable"
                      value="D:\product\odiclient\oracledi\bin\agentstop.bat"/>
                <data id="stop-args" value="-PORT=20900"/>
             </category>
          </module-data>
       </process-set>
    </process-type>
</ias-component>
...

 

Starting the ODI agent is done by:

opmnctl startproc process-type=OdiAgent

 

Stopping the ODI agent is done by:

opmnctl stopproc process-type=OdiAgent

 

After restarting or reloading the opmn you can see ODI agent starting up and showing up in the status list:

D:\product\10.1.3.1\OracleAS_1\opmn\bin>opmnctl status

Processes in Instance: soasuite.hkaukovu-fi
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
OdiAgent                         | OdiAgent           |   20780 | Alive
ASG                              | ASG                |     N/A | Down
OC4JGroup:default_group          | OC4J:home          |   31364 | Alive

1 comment:

Anonymous said...

Thanks Harri. This post is very useful as I could not start the agent as listed in the documentation. Adding the contents directly to POMN XML did the trick. Thanks again for this post.