Core GoldenGate is software completely written in C/C++. But many Oracle tools are written using Java. For example, Enterprise Manager and GoldenGate Monitor. ETL tool Oracle Data Integrator was also developed using Java. All these tools work with GoldenGate and communications should be secured: there should be authentication, encryption, etc.
Oracle uses special agent to make these communications possible. We call these agent GoldenGate Agent (previously it was called JAgent). If will look at GoldenGate 11.2 or 12.1 then we see this agent is embedded: there are folders cfg and dirjar in GoldenGate Home. First folder contains GoldenGate configuration, the second one contains java libraries (jar) for GoldenGate agent execution.
There were some limitation of embedded agent: you couldn’t create multiple agents (for OEM and GG Monitor), you must remove old agent and add new one to make communications with server (Monitor or OEM) more stable. Oracle has removed GoldenGate Monitor from core GoldenGate 12.2 installation to overcome these limitations. So we should install GoldenGate Agent before configuring communications with OEM and ODI. Unfortunately GoldenGate Agent documentation is a little bit poor. So am writing this article to compensate this issue.
You can see basic architecture of GoldenGate, GoldenGate agent and monitoring tools communications in the picture above.
GoldenGate has Manager process which listens to special port called manager port. By default this port is 7809. You can find its value in GG_HOME/dirprm/mgr.prm.
GoldenGate Agent communicates with GoldenGate Manager process through Manager port (7809). This communication is insecure but this is not problem because usually this communication is done locally.
If we configure GoldenGate Agent to communicate with ODI or OEM (parameter agent.type.enabled=OEM) then GoldenGate Agent listens on RMI port. We configure this port using parameter jagent.rmi.port in $GG_HOME/cfg/Config.properties. By default value of this parameter is 5559.
ODI directly or OEM through OEM Agent communicates with GoldenGate Agent through RMI port. This communication is secure. ODI or OEM agent must authenticate itself to GoldenGate Agent. Also this communication can be done using SSL (parameter jagent.ssl)
GoldenGate Agent Installation
We install GoldenGate agent in two steps: base installation and instance installation. This is like creating database: install Oracle Database software (base installation) and create database (instance installation). Base installation is done using Oracle Universal Installer, instance installation is done using script create_ogg_agent_instance.sh.
So let’s install them:
1. First of all we install base GoldenGate Agent by running
java -jar fmw_18.104.22.168.0_ogg.jar
2. Choose directory for base GoldenGate Agent installation. I chose /u01/app/oracle/product/oggAgent122/base. Let’s call this directory $OGG_AGENT_HOME
3. Chose Oracle GoldenGate Monitor Agent for installation.
4. Leave other options by default.
5. Let’s install GoldenGate agent instance. We will need JDK 1.8.
6. Enter path to GoldenGate Home, directory for GoldenGate agent instance (/u01/app/oracle/product/oggAgent122/instances/orcl_odi). Leave other parameters by default
Please enter absolute path of Oracle GoldenGate home directory : /u01/app/oracle/product/12.2.0/ora12/orcl
Please enter absolute path of OGG Agent instance : /u01/app/oracle/product/oggAgent122/instances/orcl_odi
Please enter unique name to replace timestamp in startMonitorAgent script (startMonitorAgentInstance_20151204171437.sh) :
Sucessfully created OGG Agent instance.
7. So if we will look into /u01/app/oracle/product/12.2.0/ora12/orcl/dirprm/jagent.prm we will see it contains reference to our new installed GoldenGate Agent
COMMAND java -Dconfig.dir=/u01/app/oracle/product/oggAgent122/instances/orcl_odi/cfg -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration -Doracle.core.ojdl.logging.config.file=/u01/app/oracle/product/oggAgent122/instances/orcl_odi/cfg/logging-config.xml -Doracle.core.ojdl.logging.componentId=JAGENT -jar -Xms512m -Xmx1024m /u01/app/oracle/product/oggAgent122/base/oggmon/ogg_agent/dirjar/jagent.jar
So if we enable GoldenGate agent and run START JAGENT then it will be started from this new directory. Also we can start it using its own generated script.
GoldenGate Agent Configuration
Let’s configure GoldenGate agent.
1. Edit configuration file /u01/app/oracle/product/oggAgent122/instances/orcl_odi/cfg/Config.properties
2. Add (or check) the following parameters (usually it required to change only agent.type.enabled):
jagent.username=oggmajmxusr # Note: this parameter was root in earlier versions
3. Configure password for connection to GoldenGate Agent – it will be stored in special wallet
# wallet already exists – let’s remove it
4. Create GoldenGate Datastore
5. Enable GoldenGate monitoring in $GG_HOME/GLOBALS file
6. Restart GoldenGate Manager and ggsci then start GoldenGate Agent
7. Monitor log file – you should see errors but a lot of notification (it would be better to turn off notifications later)
[2015-12-04T17:37:20.952+03:00] [JAGENT] [NOTIFICATION] [OGGMON-20405] [com.goldengate.monitor.jagent.comm.ws.ManagerWSApi] [tid: StatusCollector] [ecid: 0000L5hRARc3n3WjLxnJ8A1MOQK6000003,0] Load pseudo Objects for Process Name:CAB and Status Code:1
[2015-12-04T17:37:20.953+03:00] [JAGENT] [NOTIFICATION] [OGGMON-20405] [com.goldengate.monitor.jagent.comm.ws.ManagerWSApi] [tid: StatusCollector] [ecid: 0000L5hRARc3n3WjLxnJ8A1MOQK6000003,0] Load pseudo Objects for Process Name:PAB and Status Code:8
[2015-12-04T17:37:35.984+03:00] [JAGENT] [NOTIFICATION] [OGGMON-20405] [com.goldengate.monitor.jagent.comm.ws.ManagerWSApi] [tid: StatusCollector] [ecid: 0000L5hRARc3n3WjLxnJ8A1MOQK6000003,0] Load pseudo Objects for Process Name:CAB and Status Code:1
[2015-12-04T17:37:35.984+03:00] [JAGENT] [NOTIFICATION] [OGGMON-20405] [com.goldengate.monitor.jagent.comm.ws.ManagerWSApi] [tid: StatusCollector] [ecid: 0000L5hRARc3n3WjLxnJ8A1MOQK6000003,0] Load pseudo Objects for Process Name:PAB and Status Code:8
8. That’s all. We can go to ODI or OEM to configure connection
Configure ODI to connect to GoldenGate Agent
1. Choose tab Topology in ODI
2. Choose Physical architecture->GoldenGate
3. Create Data Server
4. Test connection (see button in left upper corner).