适用于 Centos7 和 oracle 的 ODBC 驱动程序不起作用



我正在尝试在 Centos7 上设置 odbc 驱动程序,但连接不起作用。

我在 IDE 中收到的错误消息是:

[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (0) (SQLDriverConect)

ODBCINST.ini 包含以下内容

[oracle-driver]
DRIVER=/opt/oracle/product/19c/dbhome_1/lib/libclntsh.so.19.1
Description=oracle driver
trace=No
Server=localhost
.odbc.ini contains
[oracle-driver]
DRIVER='oracle-driver'
SERVER=localhost
Port=1521
databse=oracle
uid=oracle

侦听器状态包含以下内容:

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                21-OCT-2019 10:47:04
Uptime                    0 days 5 hr. 20 min. 34 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "9508ea17840841cde055000000000001" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDBXDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "orclpdb1" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
The command completed successfully

请问你能帮忙吗?

试试 databse=ORCLCDB (or orclpdb1( 相反 databse=oracle

相关内容

最新更新