schemacrawler / SchemaCrawler

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

SchemaCrawler seems to ignore database + schema parameter #231

Closed Tiberriver256 closed 5 years ago

Tiberriver256 commented 5 years ago

Issue

Please explain the issue briefly

.\schemacrawler.cmd -user=AUser -database=ADataBase -schema=ADataBase.dbo -host=ARemoteHost -server=sqlserver -command=lint

Produces:

Error: Exception retrieving table information: The server principal "AUser" is not able to access the database "ACompletelyDifferentDatabase" under the current security context.

I thought the database argument plus the schema argument should limit the scope to just that database but it seems to want to touch other databases on it's own.

Environment

Specify the

  • version of SchemaCrawler that you are using 15.01.06
  • version of Java that you are using java -version
    java version "1.8.0_191"
    Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
  • operating system and version that you are using Windows 10 client to Windows Server 2016 Server
  • relational database and version that you are using Microsoft SQL Server 2016
  • JDBC driver and version that you are using Not sure
sualeh commented 5 years ago

@Tiberriver256 Micah, it is actually the -schemas option that limits the databases crawled. Please note that you have misspelled -schemas - there should be an additional "s" at the end. Please try that out and let me know if it works for you.

Tiberriver256 commented 5 years ago

Thank you! That was it lol.