Ad Widget

Collapse

ODBC oracle error on web interface ORA-12154: TNS:could not resolve the connect ident

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mark.chan
    Member
    • Mar 2016
    • 35

    #1

    ODBC oracle error on web interface ORA-12154: TNS:could not resolve the connect ident

    Problems come out one by one.....

    After solving [Driver Manager]Can't open lib '/usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1' : file not found]|

    and other problem
    Cannot connect to ODBC DSN:[SQL_ERROR]:[08004][12154][[unixODBC][Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified
    ]|

    those error message are shown on web interface
    again, the isql is work...
    Code:
    [root@localhost ~]# isql -v uatt
    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL> quit
    For the env:
    Code:
    [root@localhost ~]# echo $LD_LIBRARY_PATH
    /usr/lib/oracle/12.1/client64/lib/
    [root@localhost ~]# echo $TNS_ADMIN
    /usr/lib/oracle/12.1/client64/network/admin
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Please read error messages.
    Location of the configuration files, such as tnsnames.ora is will incorrect.

    It might also be improved by setting such as the environment variable ORACLE_HOME.

    Comment

    • mark.chan
      Member
      • Mar 2016
      • 35

      #3
      But when i use isql to connect, it is ok.

      is that add the ORACLE_HOME to to sysconfig/zabbix ?


      edit:
      i now adding those var into 3 files: /root/.bash_profile , /root/.bashrc and /etc/sysconfig/zabbix

      Code:
      LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
      export LD_LIBRARY_PATH
      
      TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin
      export TNS_ADMIN
      
      ORACLE_HOME=/usr/lib/oracle/12.1/client64
      export ORACLE_HOME
      and it doesn't work.....

      Code:
      [root@localhost ~]# ls -al $ORACLE_HOME/network/admin/
      total 4
      drwxr-xr-x. 2 root root  25 Apr  6 17:54 .
      drwxr-xr-x. 3 root root  18 Apr  6 17:54 ..
      -rw-r--r--. 1 root root 250 Mar 30 17:53 tnsnames.ora
      i also put those file under root dir which is teached by another website
      Code:
      [root@localhost ~]# ls -al
      total 48
      dr-xr-x---.  3 root root 4096 Apr  7 18:17 .
      dr-xr-xr-x. 17 root root 4096 Apr  6 16:29 ..
      -rw-------.  1 root root 1005 Apr  6 16:29 anaconda-ks.cfg
      -rw-------.  1 root root 4363 Apr  8 11:06 .bash_history
      -rw-r--r--.  1 root root   18 Dec 29  2013 .bash_logout
      -rw-r--r--.  1 root root  383 Apr  8 11:01 .bash_profile
      -rw-r--r--.  1 root root  384 Apr  8 11:01 .bashrc
      -rw-r--r--.  1 root root  100 Dec 29  2013 .cshrc
      -rw-------.  1 root root    0 Apr  6 19:05 .mysql_history
      -rw-r--r--.  1 root root    0 Apr  6 17:44 .odbc.ini
      drwxr-----.  3 root root   18 Apr  6 16:48 .pki
      -rw-r--r--.  1 root root  129 Dec 29  2013 .tcshrc
      -rw-r--r--.  1 root root  250 Mar 30 17:53 .tnsnames.ora
      -rw-r--r--.  1 root root  250 Mar 30 17:53 tnsnames.ora
      Still doesn't work...


      FINALLY, I got it by DISABLE the SELinux!!!!
      Last edited by mark.chan; 08-04-2016, 12:10.

      Comment

      Working...