GoldenGate

OGG Hub deployment with Incorrect TNS_ADMIN Location

By November 30, 2025No Comments3 min read

In this blog post, we will walk through how to identify the TNS_ADMIN location after the Oracle Golden Gate 21.3 Installation and also we will learn how to update to the correct TNS_ADMIN, so that we can able to configure credentials at Hub GUI.

Let’s observe below screenshot, I’ve added the credentials with the Service Name but unfortunately we have faced ORA-12154. Which refers to the TNS Service Name is unavailable to call.

At first look, it appears to be strange. Anyhow lets dig to know what was the TNS_ADMIN location i’ve given during the installation.

There are two ways to identify them.

  1. Using the PID of the ServiceManager
[oracle@ggate2 etc]$ ps -ef | egrep "ServiceManager|adminsrvr" | grep -v grep
oracle     14083       1  0 04:06 ?        00:00:58 /ogg/ggma/ggma_install/bin/adminsrvr --config /ogg/ggma/ggma_srv/var/temp/GGDEPLOY-adminsrvr-config.dat --force --quiet
oracle     14333       1  2 04:06 ?        00:05:51 /ogg/ggma/ggma_install/bin/ServiceManager --inventory '/ogg/ggma/ggma_srv/etc/conf'
[oracle@ggate2 etc]$ cat /proc/14083/environ | tr '\0' '\n' | egrep 'TNS_ADMIN|ORACLE_HOME|ORACLE_SID'
TNS_ADMIN=/data/app/oracle/product/19C/dbhome_3
ORACLE_SID=mindb
ORACLE_HOME=/ogg/ggma/ggma_install
[oracle@ggate2 etc]$

From the PID of the ServiceManager we can view the environment information and we can see the ORACLE_HOME, ORACLE_SID and also TNS_ADMIN. The TNS_ADMIN location i’ve given as ORACLE_HOME and forgot to provide network/admin sub directories.

2. Using the Configuration File

[root@ggate2 ~]# cd /ogg/ggma/ggma_srv/etc/conf
[root@ggate2 conf]# ls
deploymentRegistry.dat  logging  ogg  sca
[root@ggate2 conf]# cat deploymentRegistry.dat
{
    "GGDEPLOY": {
        "passwordRegex": ".*",
        "$schema": "ogg:deployment",
        "oggConfHome": "/ogg/ggma/ggma_deploy/etc/conf",
        "oggVarHome": "/ogg/ggma/ggma_deploy/var",
        "oggHome": "/ogg/ggma/ggma_install",
        "oggEtcHome": "/ogg/ggma/ggma_deploy/etc",
        "oggSslHome": "/ogg/ggma/ggma_deploy/etc/ssl",
        "enabled": true,
        "oggDataHome": "/ogg/ggma/ggma_deploy/var/lib/data",
        "id": "ce19bab2-10e5-4396-8a16-51d0093d31a7",
        "environment": [
            {
                "name": "LD_LIBRARY_PATH",
                "value": "${OGG_HOME}/lib/instantclient:${OGG_HOME}/lib"
            },
            {
                "name": "TNS_ADMIN",
                "value": "/data/app/oracle/product/19C/dbhome_3"
            },
            {
                "name": "JAVA_HOME",
                "value": "${OGG_HOME}/jdk"
            }
        ]
    },
    "ServiceManager": {
        "oggHome": "/ogg/ggma/ggma_install",
        "id": "8641c83e-2197-4bd7-a995-bc8c35bad29a",
        "oggEtcHome": "/ogg/ggma/ggma_srv/etc",
        "oggVarHome": "/ogg/ggma/ggma_srv/var"
    }

Under the ServiceManager home we have file deploymentregistry.dat, which wil be having the entire information and in above output also we can see the TNS_ADMIN was incorrect without network/admin sub directories.

Now let’s update the configuration file with correct TNS_ADMIN location as below.

}[root@ggate2 conf]# vi deploymentRegistry.dat
[root@ggate2 conf]# cat deploymentRegistry.dat |grep admin
                "value": "/data/app/oracle/product/19C/dbhome_3/network/admin"
[root@ggate2 conf]#

After the changes we must kill existing services and restart all the OGG Hub Services

[root@ggate2 conf]# pkill -f adminsrvr
[root@ggate2 conf]# pkill -f distsrvr
[root@ggate2 conf]# pkill -f recvsrvr
[root@ggate2 conf]# pkill -f pmsrvr
[root@ggate2 conf]# pkill -f ServiceManager
[root@ggate2 conf]# systemctl restart OracleGoldenGate.service
[root@ggate2 conf]#

Now we will connect to the OGG Hub GUI if OGG able to pull the service name and abel to create the service?

Now we able to configure credentials successfully.

-Thank You

Leave a Reply