Sunday 14 September 2008

ODI Series Part 2 - The Agent

Ok, so ODI is installed so we are now going to look at setting up an agent.

An agent is a java service that acts a listener on a designated tcp/ip port, the agent allows execution of sessions such as model reverses, packages, scenarios and interfaces, you will learn about more of these later.

You can set an agent up to run as a windows services or from a batch script, I am going to show both methods.

First of all you need to locate and edit the file odiparams.bat that resides in the ODI bin directory.



The section you need to update is after
rem
rem Repository Connection Information

rem


Update the Driver and URL to match your ODI repository you should be used to doing this now.
The username and password are account details for the Master repository, you notice you have to enter an encoded password, and there is a batch utility in the bin directory that will encode passwords for you.



Update the ODI_SECU_WORK_REP to match the name of your work repository that you set up in the topology manager.

You can leave the ODI_USER and pass alone if you have not changed the security for ODI.


To start the agent you will just need to create a simple batch script.


The port can be set to anything you like as long as you know it won’t conflict with anything else. Next add another script to stop the agent



Before you can start the agent a few more additional configurations are required in the topology manager.

First you will need to insert an agent and give it a name, enter the host and the port you defined in the batch script.



You can’t actually test yet as the agent is not running.

Next I am going to create a context, a context is basically a way of grouping different components together, so you can have say a development context which will bring together certain technologies, databases, applications and agents.
There is already a global context available but I like to always set extra ones up for flexibility, the context section can be accessed from the second tab



Finally a logical agent needs to be created which defines the link between the agent and the context.



Once this is completed you should be able to start up the agent.



Just to be sure the agent is actually working you can go back and test it from the topology manager.



Well that’s all well and fine but some people like to have everything running as a windows service, as long as you have updated the odiparams.bat then it is simple.




Just make sure you create the service with the same physical agent name and the same port as you set up in the topology manager.
You can check the service is running by opening the agentservice.log in the bin directory.

One thing to watch out for is that if you ODI_JAVA_HOME is set to a directory with spaces, if you are just using the default install then you will be fine otherwise you will need to add quotes to the java config in the odiparams.bat file.

set ODI_JAVA_EXE=%ODI_JAVA_HOME%\bin\java.exe
set ODI_JAVAW_EXE=%ODI_JAVA_HOME%\bin\javaw.exe

set ODI_JAVAC_EXE=%ODI_JAVA_HOME%\bin\javac.exe


To

set ODI_JAVA_EXE="%ODI_JAVA_HOME%\bin\java.exe"
set ODI_JAVAW_EXE="%ODI_JAVA_HOME%\bin\javaw.exe"

set ODI_JAVAC_EXE="%ODI_JAVA_HOME%\bin\javac.exe"


Once the service has been installed remove the quotes

Well that completes another session, next time I will looking at configuring the topology manager to point to a planning application, essbase database, file directory and sql database tables before we move on to the designer.

18 comments:

  1. Good Work John....
    This is my luck to see great blog.
    You Are Doing Damn GooD.

    ReplyDelete
  2. Hi John,

    Thank you for making help understand the process of integrating Essbase, planning with ODI. When I try to setup physical agent using a bat file getting the below error. I have updated the odiparams file with the required details and created physical agent with 1900 port number in Topology Manager.

    Initially, ODI_JAVA_HOME was pointed to jre, later I changed it to pointing to JDK location (E:\ora_home1\jdk1.5.0). Please do let me know if I need to make any changes before start the agent process.

    -------------------------
    Oracle DI : Starting Schedular Agent....
    java.lang.IndexOutofBoundsException:toIndex = 33683
    at java.util.SubList.< init>< UnknownSource>
    at java.util.RandomAccessSubList..< init>< UnknownSource>

    Please help

    ReplyDelete
  3. HI John..
    I am Getting An Error:

    Caused by: java.lang.Exception: Agent is not declared in Topology Manager
    ... 5 more
    Caused by:
    java.lang.Exception: Agent is not declared in Topology Manager

    Please John Help Me Out.... Thank You.

    ReplyDelete
  4. satya, just add "-NAME" parameter to your .bat file. It should look like:
    agentscheduler.bat "-port=20300" "-NAME=odi_demo_agent"

    ReplyDelete
  5. John,

    The below statement is not working for Oracle. Can you please update what we should use for Oracle

    set ODI_SECU_URL=jdbc:oracle:thin:@10.96.18.28:1521:hrep;selectMethod=cursor;databaseName=ODIMASTER;integratedSecurity=false

    ReplyDelete
  6. John:

    Fantastic information... and once you get through everything it works like a charm. You probably just saved me days of troubleshooting.

    ReplyDelete
  7. Hello Jhon!

    I really appreciate the work you have done in this blog, It's great.

    I'm posting to ask your help in a problem i'm facing at the agent configuration:

    I have already followed the steps. However, when i try to start the agent, the follow message is shown:

    C:\OraHome_1\oracledi\bin>agentscheduler "-port=20300" "-NAME=AGENTE"
    OracleDI: Starting Scheduler Agent ...
    java.lang.IndexOutOfBoundsException: toIndex = 1898067444
    at java.util.SubList.init(AbstractList.java:704)
    at java.util.RandomAccessSubList.init(AbstractList.java:860)
    at java.util.AbstractList.subList(AbstractList.java:569)
    at com.sunopsis.d.a.a.a.b.b(b.java)
    at com.sunopsis.d.a.c.a(c.java)
    at com.sunopsis.d.a.f.b(f.java)
    at com.sunopsis.tools.core.SnpsStringTools.b(SnpsStringTools.java)
    at com.sunopsis.dwg.DwgObject.snpsDecypher(DwgObject.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)


    Wish you could help me, and I thank you in anticipation.

    Araceli
    From México

    ReplyDelete
  8. Is it possible to install agent as standalone component without instaling complete ODI ?

    Thanks in advance.

    ReplyDelete
  9. Great ODI series.

    Instead of putting quotes around "%ODI_JAVA_HOME%\bin\java.exe" for a space in your path to java you could edit the agentservice.bat and put quotes around wrapper.java.command="%ODI_JAVA_EXE%".

    This saves you from adding/removing them whenever you reinstall the agent service.

    ReplyDelete
  10. Hi,
    I want to create a scenario. I have created interfaces. So i am confused after that. Do i need to create a package first or a scenario. please let me know. Also please let me know how to run interfaces parallely step by step if possible.

    Thanks and would appreciate you reply.

    ReplyDelete
  11. Good job man , tkx you very much

    ReplyDelete
  12. You did amazing work John

    Suresh

    ReplyDelete
  13. My agent test is successful but the agent says A JDK is required to execute Web Services with OracleDI. You are currently using a JRE. Does this matter and how do I change it? We just have it running locally for now.

    ReplyDelete
  14. Don't worry about the warning message it is only important if you are using web services.

    ReplyDelete
  15. Hi John,

    I was following your directions but found that the agentservice.bat doesn't seem to exist in ODI 11g. Can you please explain how to set the agent to run as a Windows service in ODI 11g?

    Thank you for your help.

    Enjoy!
    Michael

    ReplyDelete
  16. In 11G the wrapper has been removed to create a agent windows service. I have not yet had a look into whether it still can be done.

    ReplyDelete
  17. Your Blog's are very helpful John.

    ReplyDelete

Note: only a member of this blog may post a comment.