schemaSpy for DB2
larry.song 270003NT8W Comments (2) Visits (9813)
I knew there must be a tool which allows you to discover a database and visualise the table relationships but I never found it until last week on a training course an Oracle DBA told me that tool is schemaSpy.
Running it against DB2 with the latest JDBC Type 4 driver (db2jcc.jar, to get the latest, you can download from IBM, like all the IBM downloading, it requires some patience and sometimes .. swear words) is not as smooth as I have expected. You have to change the property file contained in the jar file following the steps below:
I used it to discover the table relationships of an internal system. Here's the command line:
java -jar /tmp/schemaspy.jar -t db2net -db gsmalds -s USRLDS -host localhost -port 50006 -u usrlds -p your-password -dp /us
The output is a set of html files you can open with a browser.
Here's what I got: