Saturday, August 13, 2022

Goldengate DBLOGIN Issue OCI Error ORA (status = 12545-ORA-12545) and OGG-03542 Failed to connect to the database. Oracle Golden Gate 21c

Oracle Database 12c: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle Golden Gate 21c: /u01/app/ogg/12c_21c

[oracle@primary ~]$ cd /u01/app/ogg/12c_21c/

[oracle@primary 12c_21c]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_210728.1047_FBO
Oracle Linux 7, x64, 64bit (optimized), Oracle Database 21c and lower supported versions on Jul 29 2021 03:59:23
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
GGSCI (primary) 1> dblogin userid ogguser@db12c, password oracle
2022-08-13 20:07:33  INFO    OGG-03542  Failed to connect to the database. Verify that the connection string and following environment variables are correct:
LD_LIBRARY_PATH = /u01/app/oracle/product/12.1.0.2/dbhome_1/lib:/lib:/usr/lib:/u01/app/ogg/12c_21c.
Error: OCI Error ORA (status = 12154-ORA-12154: TNS:could not resolve the connect identifier specified
)
GGSCI (primary) 2> exit

[oracle@primary ~]$ vi .bash_profile
[oracle@primary ~]$ . ./.bash_profile
[oracle@primary ~]$
[oracle@primary ~]$ cd /u01/app/ogg/12c_21c/

[oracle@primary 12c_21c]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_210728.1047_FBO
Oracle Linux 7, x64, 64bit (optimized), Oracle Database 21c and lower supported versions on Jul 29 2021 03:59:23
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2021, Oracle and/or its affiliates. All rights reserved.

GGSCI (primary) 1> dblogin userid ogguser@db12c, password oracle
Successfully logged into database.
GGSCI (primary as ogguser@db12c) 2>

Solution:
Apart from other entries in .bash_profile added below "TNS_ADMIN" and specified in "LD_LIBRARY_PATH"
export TNS_ADMIN=$ORACLE_BASE/product/12.1.0.2/dbhome_1/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/u01/app/ogg/12c_21c:$TNS_ADMIN


1 comment:

  1. Good
    I have some issue while installing Oracle 19c
    Error in invoking target 'libasmclntsh19.ohso libasmperl19.ohso client_sharedlib' of makefile '/u01/app/oracle/product/19.3.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See ...
    Can you suggest how to resolve this error

    ReplyDelete