Skip to content

Metadata from SQLServer error - No tables SQL provided #256

Closed
@petersonjr

Description

@petersonjr

Issue

Hello, I am using SchemaCrawler to get metadata info from a SQL Server DB.
When I run SchemaCrawler against a database via commandline, I get the following error:

schemacrawler.schemacrawler.SchemaCrawlerException: No tables SQL provided

The command is as follows:

schemacrawler.exe -url 'jdbc:sqlserver://server:port' -u 'user' -password 'password' -server 'sqlserver' -fmt 'json' -schemas 'DBINFO\..*' -c schema -loglevel=ALL

The user that I connect to DB with has only permissions to view definition of the database (grant view definition to user).
I tried using the Java API to achieve same goal, and notice a few things:

  • When I use "metadata" as Metadata Retrieval Strategy , or "metadata_all", I get no errors but also no table information. Seems that the sql server jdbc does not return metadata definitions, even the user having granted view definitions.
  • When I use "data_dictionary_all" as Metadata Retrieval Strategy I get the same error as in command line: "No tables SQL provided"
  • I noticed that schemacrawler-sqlserver lib has no TABLES.sql resource file. Is this the cause of the error?

Therefore, I kindly ask a few questions:

  • What does the 3 Metadata Retrieval Strategies mean? And how they work?
  • Why schemacrawler-sqlserver lib has no query to get tables information? Is it a limitation of SQL Server?
  • To get table information through metadata retrieval strategy in sql server is necessary to have select permission on the database? Why just view definition permission is not enough? (I know this last question is a little specific)

Thank you for the time and effory you put in this useful tool,

Péterson

Environment

INFORMAÃıES: Environment:
SchemaCrawler 15.06.01
Windows 7 6.1
"Oracle Corporation" Java HotSpot(TM) 64-Bit Server VM 10.0.1+10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions