[ZBX-17897] Oracle ODBC connection string Created: 2020 Jun 10  Updated: 2020 Sep 18

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 5.0.0, 5.0.1
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Roman Monakhov Assignee: Renats Valiahmetovs (Inactive)
Resolution: Unresolved Votes: 3
Labels: odbc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen-20200610132257-762x501.png    

 Description   

ODBC monitoring without DSN was implemented in 5.0.0. It works well with MySQL, PostgreSQL and FreeTDS but doesn't work with Oracle (driver version 19.1, unixODBC 2.3.1). Hovever, it works well in classic way with DSN in odbc.ini.

Connection strings tested:

db.odbc.get[test,,"Driver=Oracle;ServerName=testserver:port/database"]
db.odbc.get[test,,"Driver=Oracle;ServerName=testserver;Port=Port;DSN=database"]

User and password are in macroses.



 Comments   
Comment by Andrei Gushchin (Inactive) [ 2020 Jun 10 ]

Roman,
Thank you for raising this.
What error received for this key? Do ORACLE env variables were exported for the server?

Comment by Roman Monakhov [ 2020 Jun 10 ]

The error is:

Cannot connect to ODBC DSN: [SQL_ERROR]:[HY000][12543][[unixODBC][Oracle][ODBC][Ora]ORA-12543: TNS:destination host unreachable]

Environment variables are exported (classical way with db.odbc.get[test,DSN) working well).

Comment by Khatsayuk Alexander [ 2020 Sep 18 ]

That's OK. Correct item key for Oracle may be something like that:

db.odbc.select["description",,"Driver=/path/to/driver.so;Dbq=HOSTNAME:PORT/DB_SID]

db.odbc.select["description",,"Driver=DriverNameInOdbcinst;Dbq=HOSTNAME:PORT/DB_SID]

https://www.connectionstrings.com/oracle/

Generated at Fri Apr 04 12:07:49 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.