hdknr / note

Markdown Texts
http://qiita.com/hidelafoglia
7 stars 1 forks source link

MySQLのER図を生成する #31

Open hdknr opened 7 years ago

hdknr commented 7 years ago
hdknr commented 7 years ago

SchemaSpy

$ java -jar schemaspy.jar -t mssql05 -dp C:/sqljdbc4-3.0.jar ¥
 -db DATABASE -host SERVER -port 1433 -s dbo ¥
-u USER -p PASSWORD -o DIRECTORY
hdknr commented 7 years ago
$ git clone https://github.com/schemaspy/schemaspy.git && cd schemaspy
$ ./mvnw install
[INFO] Installing /home/vagrant/schemaspy/target/schemaspy-6.0.0-rc1.jar to ¥
/home/vagrant/.m2/repository/org/schemaspy/schemaspy/6.0.0-rc1/schemaspy-6.0.0-rc1.jar
$ sudo apt-get install libmysql-java
hdknr commented 7 years ago
JAR=/home/vagrant/.m2/repository/org/schemaspy/schemaspy/6.0.0-rc1/schemaspy-6.0.0-rc1.jar
java -jar $JAR  -t mysql -o $DBN -host localhost -db $DBN -u $DBU -p $DBP
hdknr commented 6 years ago

-dbhelp

$ java -jar /vagrant/projects/taiheigroup/taihei-reform/bin/schemaspy.jar -dbhelp
  ____       _                          ____                                                                                                                           
 / ___|  ___| |__   ___ _ __ ___   __ _/ ___| _ __  _   _  
 \___ \ / __| '_ \ / _ \ '_ ` _ \ / _` \___ \| '_ \| | | |        
  ___) | (__| | | |  __/ | | | | | (_| |___) | |_) | |_| |        
 |____/ \___|_| |_|\___|_| |_| |_|\__,_|____/| .__/ \__, |        
                                             |_|    |___/         

                                              6.0.1-SNAPSHOT                                  
                                                                                   T

SchemaSpy generates an HTML representation of a database schema's relationships.
SchemaSpy comes with ABSOLUTELY NO WARRANTY.
SchemaSpy is free software and can be redistributed under the conditions of LGPL version 3 or later.
http://www.gnu.org/licenses/

INFO  - Starting Main v6.0.1-SNAPSHOT on ubuntu with PID 10742 (/vagrant/projects/taiheigroup/taihei-reform/bin/schemaspy.jar started by vagrant in /vagrant/projects/taiheigroup/taihei-reform/bin)
INFO  - The following profiles are active: default
INFO  - Started Main in 6.382 seconds (JVM running for 8.68)
INFO  - Built-in database types and their required connection parameters:
INFO  - IBM DB2 with the 'App' Driver
INFO  -    -db                  database name
INFO  - IBM DB2 with the Type 4 'Net' Driver
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - IBM DB2 for z/OS with the 'App' Driver
INFO  -    -db                  database name
INFO  - IBM DB2/zos with the Type 4 'Net' Driver
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Derby Embedded Server
INFO  -    -db                  path to database
INFO  - Derby Network Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Firebird
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - H2 Server
INFO  -    -db                  database name
INFO  - Hive
INFO  -    -host                database host
INFO  -    -port                database port
INFO  -    -db                  database name
INFO  - Hive with keytab support
INFO  -    -host                database host
INFO  -    -port                database port
INFO  -    -db                  database name
INFO  -    -principal                   the principal to use
INFO  - Hive with keytab support configured for service discovery using zookeeper
INFO  -    -host                database host
INFO  -    -port                database port
INFO  -    -db                  database name
INFO  - HSQLDB Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Imapla
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - InformixSQL
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  -    -server              database server
INFO  - Microsoft SQL Server JTDS
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - MariaDB
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - MaxDB
INFO  -    -host                Name of the computer on which the database instance is running
INFO  -    -db                  Name of database instance
INFO  - Microsoft SQL Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL 2000/2005 Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL 2000/2005 Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  -    -instance            Named instance to connect to
INFO  - Microsoft SQL Server 2005+
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL 2000/2005 Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL 2000/2005 Server
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  -    -instance            Named instance to connect to
INFO  - Microsoft SQL Server 2008+
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL Server 2008+
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - jTDS JDBC Driver for Microsoft SQL Server 2008+
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  -    -instance            Named instance to connect to
INFO  - MySQL
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - MySQL
INFO  -    -host                host where database resides with optional port
INFO  -    -db                  database name
INFO  -    -socketFactory               ClassName of socket factory which must be in your classpath
INFO  -    -socket              Path To Socket
INFO  - Netezza
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db
INFO  - Oracle with OCI8 Driver
INFO  -    -db                  database name (from TNSNAMES.ORA)
INFO  - Oracle with Thin Driver
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database SID as known on host
INFO  - Oracle with Thin Driver
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database (service) as known on host
INFO  - PostgreSQL
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Amazon redshift
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - SQLite
INFO  -    -db                  path to database or :memory:
INFO  - SQLite
INFO  -    -db                  path to database or :memory:
INFO  - Sybase Server (jdbc3)
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Sybase Server (jdbc2)
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - Teradata
INFO  -    -db                  database name
INFO  -    -s                   ?????
INFO  -    -port                ?????
INFO  - DB2 UDB Type 4 Driver
INFO  -    -host                host of database, may contain port
INFO  -    -port                optional port if not default
INFO  -    -db                  database name
INFO  - You can use your own database types by specifying the filespec of a .properties file with -t.
INFO  - Grab one out of /vagrant/projects/taiheigroup/taihei-reform/bin/schemaspy.jar and modify it to suit your needs.