我在 Windows 10 上使用 SQL Developer 23.1,并尝试让 SQL Developer 使用 OCI 客户端。 我已按照我能找到的所有说明进行操作,但在测试时出现以下错误
Testing the Instant Client located at C:\Users\brubin\Oracle\instantclient_21_11
Testing client directory ... OK
Testing loading Oracle JDBC driver ... OK
Testing checking Oracle JDBC driver version ... OK
Driver version: 21.9.0.0.0
Testing testing native OCI library load ... Failed:
Error loading the native OCI library
The native OCI driver could not be loaded. The system propertyjava.library.path contains the
entries from the environment variable PATH. Check it to verify that
the expected native library directory C:\Users\brubin\Oracle\instantclient_21_11 is present
and precedes any other client installations.
java.library.path = C:\Users\brubin\Oracle\instantclient_21_11
我已将 Instant Client 版本 21 下载到
C:\Users\brubin\Oracle\instantclient_21_11
我已将位置添加到客户端作为路径中的第一个条目
我创建了一个
.bat
文件来运行 SQL Developer
set PATH=C:\Users\brubin\Oracle\instantclient_21_11;%PATH%
"C:\Users\brubin\Oracle SQL Developer 23.1.0.097.1607\sqldeveloper.exe"
但是,当我在 SQL Developer 中点击测试时,仍然出现上面的错误
尝试使用以下文件覆盖即时客户端目录中的 ojdbc11.jar: https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc11/21.11.0.0/ojdbc11-21.11.0.0.jar
拥有带有即时客户端的 jdbc 驱动程序的 corespoding 版本。
当我使用您的 OJDBC11 版本 21.9.0.0.0 尝试即时客户端 21.11 时,我得到了与您相同的错误。 使用 OJDBC11.jar 的相应版本,它对我有用:
Testing the Instant Client located at C:\Oracle\instantclient_21_11
Testing client directory ... OK
Testing loading Oracle JDBC driver ... OK
Testing checking Oracle JDBC driver version ... OK
Driver version: 21.11.0.0.0
Testing testing native OCI library load ... OK
Success!