我正在尝试使用SchemaCrawler和jTDS驱动程序(版本1.3.1)从MSSQL数据库中导出模式。
该命令为:
./schemacrawler.sh \
-server=sqlserver \
-password= \
-command=schema \
-outputformat=png \
-outputfile=./output/result.png \
-infolevel=standard \
-schemas=.*XYZ.*DOMAIN.user.* \
-tabletypes=TABLE \
-tables=.* \
-routinetypes= \
-loglevel=ALL \
-url=jdbc:jtds:sqlserver://server.com:1433/XYZ\;instance=dbinstance\;useNTLMv2=TRUE\;domain=DOMAIN\;user=user\;password=pwdDB表是在用户的模式下创建的,例如: DOMAIN\user.Table1
匹配模式的连接URL和正则表达式可以很好地工作--当我使用相同的连接字符串启动数据库管理器时,我可以看到所有的表都被列为DOMAIN\user.table。
然而,当我从Docker容器中运行脚本时,我得到了:
Mar 14, 2017 8:53:18 PM schemacrawler.crawl.SchemaCrawler crawlTables
INFO: Crawling tables
Mar 14, 2017 8:53:18 PM schemacrawler.crawl.TableRetriever retrieveTables
INFO: Retrieving tables for schema: "XYZ"."DOMAIN\user"
Mar 14, 2017 8:53:18 PM schemacrawler.crawl.TableRetriever retrieveTables
FINER: Retrieving table types: [TABLE]
Mar 14, 2017 8:53:18 PM schemacrawler.crawl.MetadataResultSet close
INFO: Processed 0 rows for <retrieveTables>
Mar 14, 2017 8:53:18 PM schemacrawler.crawl.SchemaCrawler crawlTables
INFO: Retrieved 0 tables你知道为什么它看不到表吗?
发布于 2017-03-17 07:29:57
请访问SchemaCrawler网站上的Making Connections to a Database,看看是否有帮助。请尝试使用-schemas=.*user\.dbo.*,看看它是否适用于您。
苏阿利赫·法塔希,SchemaCrawler
https://stackoverflow.com/questions/42796409
复制相似问题