schemacrawler / SchemaCrawler

Free database schema discovery and comprehension tool
http://www.schemacrawler.com/
Other
1.6k stars 199 forks source link

I am only getting the standard schemas from MS SQL Server #188

Closed magoralczyk closed 6 years ago

magoralczyk commented 6 years ago

Environment

I am using only the libs/tools from the downloaded package 14.21.02

Issue

I am testing the api from java code (using the provided ApiExample.java, but commented out all the options settings to disable any filtering) an the connection to the server works fine. The user is sysadmin on the server but I only get the standard Microsoft provided schemas (db_*, dbo, guest, INFORMATION_SCHEMA, sys) and not my own ones. Then I tested it on the command line with the same results. I am also wondering, why I get all the databases on the server, since I am defining the database in the connectionUrl (api) and database parameter (command line). This could be avoided using filtering, I know, but what of what use is the database command line parameter?

sualeh commented 6 years ago

@magoralczyk

  1. I am not sure why the Microsoft JDBC driver returns you only the standard Microsoft schemas. Please turn on SchemaCrawler logging to see if your schemas are being returned. If they are not being returned, please open an issue on Microsoft/mssql-jdbc. Otherwise, please attach the SchemaCrawler logs to this issue.
  2. The database on the command-line parameter is used to create a connection to the database. Please see the official Microsoft documentation on the JDBC driver.
sualeh commented 6 years ago

Were you able to resolve the issue?

magoralczyk commented 6 years ago

Well, I was not able, because I am out of strategies. I had the logging activated, and no other than std schemas came back. I saw a youtube video, where schemacrawler is used to crawl the std Microsoft AdventureWorks Database, which was located in a userspecific schema and it worked, so on the one hand I am nearly 100% sure, that I am using it wrong, but I have no Idea what to change, since I have tested the provided example code and the CL interface and using the packaged driver. I have also traced the sql-statements sent to the server and saw, that a local table with the std schemas is built, and then looped through, so nothing else can come back. If you have an idea other than opening an issue at mssql-jdbc, I will test it.

sualeh commented 6 years ago

@magoralczyk - thanks for the research. If Microsoft SQL Server and the Microsoft JDBC driver do not report your schemas, SchemaCrawler will not be able to process them. Please open an issue at mssql-jdbc.