1

I'm trying to export a schema from MSSQL database using SchemaCrawler & jTDS driver (version 1.3.1).

The command is:

./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=pwd

The DB tables were created under the user's schema, e.g.: DOMAIN\user.Table1

The connection URL and regex to match the schema work fine - when I launch the Database Manager with the same connection string, I can see all the tables listed as DOMAIN\user.table.

However, when I run the script from a Docker container, I'm getting:

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

Any ideas why it can't see the tables?

Stano
  • 171
  • 2
  • 6

1 Answers1

0

Please see Making Connections to a Database, on the SchemaCrawler website, and see if that helps. Please try -schemas=.*user\.dbo.* and see if that works for you.

Sualeh Fatehi, SchemaCrawler

Sualeh Fatehi
  • 4,700
  • 2
  • 24
  • 28
  • Thank you for the tip! Unfortunately it didn't help :( When I check the log, it correctly parses the schemas and finds the right one. But for some reason it doesn't see any tables in it. Can I somehow get the exact query it uses to fetch the tables? – Stano Mar 17 '17 at 09:42
  • @Stano Please open a GitHub issue - https://github.com/sualeh/SchemaCrawler/issues – Sualeh Fatehi Mar 17 '17 at 17:53