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

问题描述 投票:0回答:1

我正在尝试在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

请您帮忙?

oracle odbc centos7
1个回答
0
投票

尝试databse = ORCLCDB代替databse = oracle

© www.soinside.com 2019 - 2024. All rights reserved.