When I try to retrieve stored procedures from an SQL Server database using the SchemaCrawler API, I get this error:
12:28:07.427 [main] INFO schemacrawler.crawl
Here is how to get full SchemaCrawler support for Microsoft SQL Server.
<dependency>
<groupId>us.fatehi</groupId>
<artifactId>schemacrawler-sqlserver</artifactId>
<version>14.02.02</version>
</dependency>
Use code similar that this below.
final DatabaseSystemConnector dbSystemConnector = new SqlServerDatabaseConnector().getDatabaseSystemConnector();
final DatabaseSpecificOverrideOptions databaseSpecificOverrideOptions = dbSystemConnector.getDatabaseSpecificOverrideOptionsBuilder().toOptions();
final SchemaCrawlerOptions schemaCrawlerOptions = new SchemaCrawlerOptions(); schemaCrawlerOptions.setSchemaInfoLevel(InfoLevel.maximum.buildSchemaInfoLevel());
final Catalog catalog = SchemaCrawlerUtility.getCatalog(getConnection(), databaseSpecificOverrideOptions, schemaCrawlerOptions);
Loop over the routines, and use Routine.getDefinition()
to get the definitions.
Sualeh Fatehi, SchemaCrawler