【问题标题】:How to get SchemaSpy to connect to MS SQL Server with jTDS如何让 SchemaSpy 使用 jTDS 连接到 MS SQL Server
【发布时间】:2015-10-19 18:58:12
【问题描述】:

我尝试连接的数据库是下图中的“DEV_A”,

我正在尝试让 SchemaSpy 使用 jTDS 连接到它。我如何硬塞这些碎片:

  • dbs02
  • ms_2012
  • DEV_A

进入 SchemaSpy/jTDS 要求我提供的这些参数:

  • -host
  • -db
  • -port(我假设我必须将其设置为 1433)
  • -u(用户)

【问题讨论】:

    标签: sql-server jtds schemaspy


    【解决方案1】:

    试试这个...

    java -jar "C:\path\to\schemaSpy_5.0.0.jar" -t "C:\path\to\mssql-jtds.properties" -dp "C:\path\to\jtds-1.3.0.jar" -t mssql-jtds -db DEV_A -s dbo -host localhost -port 1433 -u XXXX -p XXXX -o "C:\path\to\output" -hq -gv "C:\path\to\graphviz"
    

    “mssql-jtds.properties”在哪里:

    description=jTDS JDBC Driver for Microsoft SQL 2000/2005 Server
    extends=mssql
    connectionSpec=jdbc:jtds:sqlserver://localhost/DEV_A;instance=app
    driver=net.sourceforge.jtds.jdbc.Driver
    driverPath=/path/to/jtds-1.2.5.jar
    dbThreads=1
    selectTableCommentsSql=select sys.tables.name as table_name, (select value from sys.extended_properties where sys.extended_properties.major_id = sys.tables.object_id and sys.extended_properties.minor_id = 0) as comments from sys.tables where sys.tables.schema_id=1
    selectColumnCommentsSql=select sys.tables.name as table_name, sys.columns.name as column_name, (select value from sys.extended_properties where sys.extended_properties.major_id = sys.columns.object_id and sys.extended_properties.minor_id = sys.columns.column_id) as comments from sys.columns, sys.tables, sys.types, sys.schemas where sys.columns.object_id = sys.tables.object_id and sys.columns.user_type_id=sys.types.user_type_id and sys.tables.schema_id=sys.schemas.schema_id and sys.schemas.name = 'dbo'
    

    【讨论】: