与SchemaSpy连接时,我已经安装了64位Oracle Instant Client,但出现以下错误消息。

请注意:这两个文件都存在
C:\app\instantclient_12_1\ojdbc6.jar
C:\app\instantclient_12_1\ocijdbc12.dll

并且“C:\app\instantclient_12_1\”位于PATH中。

我也尝试过C:\app\instantclient_12_1\ojdbc7.jar,结果相同。

Windows 7 64位。

非常感谢任何获得此帮助的人的帮助。

错误信息:

Failed to load driver [oracle.jdbc.driver.OracleDriver] from classpath [file:/C:/app/instantclient_12_1/ojdbc6.jar]

Make sure the reported library (.dll/.lib/.so) from the following line can be
found by your PATH (or LIB*PATH) environment variable

java.lang.UnsatisfiedLinkError: C:\app\instantclient_12_1\ocijdbc12.dll: Specified process not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:4115)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:4111)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:308)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:662)
    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:54)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:560)
    at net.sourceforge.schemaspy.SchemaAnalyzer.getConnection(SchemaAnalyzer.java:582)
    at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:157)
    at net.sourceforge.schemaspy.Main.main(Main.java:42)
E=3I=3

最佳答案

以下是对Oracle数据库运行 SchemaSpy 6 的方法:

依存关系

确保您的机器上有以下可用的设备:

  • 来自schemaspy.org的最新版本,下面将描述schemaspy-6.0.0-rc1的过程。
  • Oracle JDBC瘦驱动程序,否则您将不得不使用Oracle OCI。您可以从Oracle Database 12.1.0.2 JDBC Driver & UCP Downloads
  • 获得它
  • SchemaSpy使用GraphViz生成图表,并从graphviz.org获取。您将需要更新PATH变量,并向其中添加C:\Program Files (x86)\Graphviz2.38\bin(确保该版本适合您下载的版本)。

  • 数据库类型

    注意,SchemaSpy支持将Oracle OCI(-t ora)和Oracle Thin(-t orathin)作为数据库类型。要获取可用数据库类型的列表:
    java -jar schemaspy-6.0.0-rc1.jar -dbhelp
    

    配置

    您可以将大多数配置参数放入一个名为schemaspy.properties的文件中,将此文件放入与schemaspy-6.0.0-rc1.jar相同的目录中。

    示例schemaspy.properties:
    # type of database. Run with -dbhelp for details
    schemaspy.t=orathin
    # path to the dowloaded oracle jdbc drivers, for example
    schemaspy.dp=C:\tools\dbdoc\drivers\ojdbc7.jar
    # database properties: host, port number, name user, password
    schemaspy.host=[orcale database host]
    schemaspy.port=[orcale database port, usualy 1521]
    schemaspy.db=[database name or SID]
    schemaspy.u=[username]
    schemaspy.p=[password, for complexer ones, put it in quotation marks]
    
    # output dir to save generated files
    schemaspy.o=C:\tools\dbdoc\output
    
    # db scheme for which generate diagrams
    schemaspy.s=[scheme name]
    

    生成文档

    完成配置后,现在您所要做的就是运行:
    java -jar schemaspy-6.0.0-rc1.jar
    

    关于oracle - 无法使用SchemaSpy连接到Oracle,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39171420/

    10-11 05:03