如何使用jTDS使SchemaSpy连接到MS SQL Server

时间:2015-10-19 18:58:12

标签: sql-server jtds schemaspy

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

SQL Server screen shot

我正在尝试让SchemaSpy使用jTDS连接到它。我如何鞋拔这些作品:

  • dbs02
  • ms_2012
  • DEV_A

进入SchemaSpy / jTDS要求我的这些争论:

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

1 个答案:

答案 0 :(得分:0)

试试这个......

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'