Skip to content

Instantly share code, notes, and snippets.

@te2u
Last active January 16, 2017 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save te2u/4038418 to your computer and use it in GitHub Desktop.
Save te2u/4038418 to your computer and use it in GitHub Desktop.
SchemaSpy sample2
#!/bin/sh
set -eu
SCRIPT_DIR=$(cd $(dirname $0);pwd);
SCHEMASPY_JAR=$SCRIPT_DIR/schemaSpy_5.0.0.jar
JDBC_DRIVER_PATH=$ORACLE_HOME/jdbc/lib/ojdbc5.jar
DBTYPE=orathin
HOST="192.168.0.100"
PORT="1521"
DBNAME=bar # SID
DBUSER=bar
DBPASS=barbar
DBSCHEMA=`echo $DBUSER | tr '[:lower:]' '[:upper:]'`
DBCHARSET='euc-jp'
DBEXCLUDE_TABLE='.+_(\d|_)+'
OUTPUT_DIR=`basename $0 '.sh'`
java -jar $SCHEMASPY_JAR \
-dp $JDBC_DRIVER_PATH \
-t $DBTYPE \
-host $HOST \
-port $PORT \
-db $DBNAME \
-s $DBSCHEMA \
-u $DBUSER \
-p $DBPASS \
-I $DBEXCLUDE_TABLE \
-noimplied \
-norows \
-charset $DBCHARSET \
-o $OUTPUT_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment