8

我安装了 Oracle Instant Client 64 位,在连接 SchemaSpy 时,我收到以下错误消息。

请注意:这两个文件都存在 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
4

1 回答 1

13

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

依赖项

确保您的机器上有以下可用内容:

  1. 来自schemaspy.org的最新版本,下面将描述 schemaspy-6.0.0-rc1 的过程。
  2. Oracle JDBC 瘦驱动程序,否则您将不得不使用 Oracle OCI。您可以从Oracle Database 12.1.0.2 JDBC Driver & UCP Downloads获得它
  3. 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
于 2017-09-13T13:13:14.873 回答