Thursday, December 13, 2007

Schema Spy Database DDL Browsing Tool

Overview

It provides an HTML view of any database schema DDL. It is an open source Java tool that is run from the command line. The home page is: Schema Spy Home Page

Setup

  • Download the single jar from the web site
  • Copy in the appropriate Oracle thin driver into the same directory
  • Download Graphviz 2.8 from the Graphviz Archive Site at: Graphviz Archive Download Site. Note the newer Graphviz libraries do not work and have been re-numbered, so you need the 2.8 archive version
  • Install Graphviz
  • Use the following command to run the tool. You can copy this into a batch script.
echo running Schema Spy
java -jar schemaSpy_3.1.1.jar -cp ./ojdbc14-10.2.0.2.jar -t orathin -host hostname
-port 1521 -db dbName -u db_user -p password -ahic -cid -o output_dir -s schema_name

  • The output will be in the "output_dir" directory.