Thursday, March 17, 2011

Oracle ODI Remote Agent

Platform: Any
Version: 11g


For those that employ Oracle's Data Integrator product, there comes a time when you no longer wish to use the local client version of the agent. 

What is the remote agent?
The agent is the background process that executes the Project related package, interface, or procedure.

However, a local agent comes installed on all client desktops and is not optimal when it comes to performance.  When you run a process through your local agent, your client desktop becomes a gateway for query processing.  So rather then having data take a trip from server 1, to your machine, and off to server 2, it is best to install the remote agent.

The remote agent sits (should sit, it's not mandatory) on the same server where your repository is installed.  When the client requests a process to be executed in ODI, you specify the remote agent instead of the local agent.  Since the remote agent is much closer to the data and database then your desktop, the performance increases.  This is especially evident if you are VPN'd into work and do not want all that data taking a trip from the company server, back to your home office, and back to the server.

Version
The latest version 11g (everyone should consider upgrading) has new methods for deploying remote agents.  You now have an option to utilize a web logic server if you have one up and running.  What we find is that for most cases, a standalone agent is easier to maintain and faster to get up and running.
The older 10g ODI was more forgiving in the java versions used on the server, but it's worth moving to 11g just for the updated designer screens.

Installation
Here are the steps, some of which aren't documented well in the docs.
  1. Copy from your local machine the 11g ODI foloders that were installed over to the same server that houses the ODI database repository.  I typically place these in the $ORACLE_HOME, new folder called odi.  Don't worry that you are taking files from a window's machine to a linux, if that is the case.   Java will work it all out.
  2. You need a compatible java run time, so download from Oracle, the latest version of JRockit.  Download from Oracle Here.  Place this in the same odi folder you created in step 1.
  3. Configure your odiparams.sh (assuming you are on linux, otherwise use the .bat file).  This file runs as part of the agent start script, and it sets your environment variables, like your ODI_JAVA_HOME.  If you point your ODI_JAVA_HOME to a non JRockit JRE on your linux box, we have found that the agent script errors out with a "Java exception in main" type message.
  4. Also, be certain to setup in the odiparams file the connection info for the repository including the name and passwords.  You must run the encode.sh script to encrypt your password.  The encode.sh also uses the odiparams.sh script, so if you have not set your ODI_JAVA_HOME, it will error out.
  5. It's a bit of a chicken and egg thing - you can't fully setup the odiparams script at first because you can't possibly know the encrypyted passwords to set.  So just set the java home, save the file, then run the encode for each password.  Go back into odiparams and paste in the new passwords and re-save.
  6. Now you are ready to run the remote agent.  At first you may want to try running it where it is persistantly listening at the prompt.  Type ". agent.sh" and see if it does not error due to java issues.
  7. Next, you need to kick it off in the background.  Exit out of the process on the command line - the listener will stop.  Type "nohup agent.sh -PORT=20910 -NAME=Remote &"
  8. You must now go into the ODI Topology and configure the remote agent in two places
Physical Architecture



Make certain the server and port match where and how your remote agent is listening.

Logical Architecture
Next, right click and add new logical agent.  Set the context and physical agent accordingly.

Conclusion
It is best practice to install and use a remote agent with ODI.  As you get into scheduling, you really have little chocie but ot move off of the local agent.  you wouldn't want to be running daily batch jobs from your PC.  If the PC went down, the jobs would terminate.


From the OnShore team, have a great weekend.

No comments:

Post a Comment