Skip to content

DB Crawler

The DB Crawler extracts structural metadata from a legacy database so that Decompose can analyze schemas, tables, and relationships. It is typically one of the first tools you use when preparing a project because many downstream features depend on imported schema information. Use this page when you need to generate the schema artifact or troubleshoot crawler-specific execution behavior.

Info

The db-crawler and database driver jars as well as access to the database are the prerequisites for DB Crawling.

For cutting a database and selecting a suitable target database, the user must first extract the schema file of the database to import it into the Decompose UI. Then the database can be further analyzed. This can be done using the DB Crawler.

For getting the db-crawler jar, please refer to Schema Upload.

For a first time login, the user might not have the schema file. To get the schema file download the crawler jar.

To extract the database schema json file, the user can run the following command:

java -Xmx8g -cp "db-crawler-<version>.jar:mssql-jdbc-9.4.0.jre8.jar" innowake.innovationlab.dbcrawler.Main -c "jdbc:sqlserver://localhost;databaseName=<database name> " -u <user name> -p <password> -f <filename>.json

The database driver jar must be compatible with the database version.


Allowing next on exhausted result set

The IBM Data Server Driver for JDBC and SQLJ automatically closes the cursor when all rows have been retrieved from a ResultSet. When ResultSet.next is executed after the cursor is closed, an SQLException is thrown. This behavior differs from the DB2 JDBC Type 2 drive, where the cursor is not automatically closed when all rows from a ResultSet have been retrieved. To avoid this, the user must pass the -DallowNextOnExhaustedResultSet=1 flag when executing the crawl command.

-DallowNextOnExhaustedResultSet=1 java -Xmx8g -cp "db-crawler-<version>.jar:mssql-jdbc-9.4.0.jre8.jar" innowake.innovationlab.dbcrawler.Main -c "jdbc:sqlserver://localhost;databaseName=<database name> " -u <user name> -p <password> -f <filename>.json DallowNextOnExhaustedResultSet=1

  • IBM Support. More Support for: Db2 for Linux, UNIX and Windows. Software version: 9.7, 0.5, 91. Operating system(s): AIX; Linux, Solaris, Windows. Document number: 416563. Modified Date: 16 June 2018.