项目作者: qwazer

项目描述 :
Command line util for export oracle schema to set of ddl scripts
高级语言: Java
项目地址: git://github.com/qwazer/scheme2ddl.git
创建时间: 2015-03-19T13:34:37Z
项目社区:https://github.com/qwazer/scheme2ddl

开源协议:

下载


Latest version of 'scheme2ddl' @ Cloudsmith Build Status Coverage Status

scheme2ddl is command line util for export oracle schema to set of ddl scripts. Provide a lot of configurations via basic command line options or advanced XML configuartion.

scheme2ddl is part of
oracle-ddl2svn project.

Benefits

scheme2ddl give ability to filter undesirable information, separate DDL in different files, pretty format output.

Download

Use link above or

  1. wget https://dl.cloudsmith.io/public/qwazer/repo/maven/com/googlecode/scheme2ddl/2.4.4/scheme2ddl-2.4.4.jar

How to start with minimal configuration

Java must be installed on your computer.

For exporting oracle scheme you must provide

  • DB connection string
  • output directory

Usage example. Command

  1. java -jar scheme2ddl.jar -url scott/tiger@localhost:1521:ORCL -o C:/temp/oracle-ddl2svn/

will produce directory tree

  1. views/
  2. view1.sql
  3. view2.sql
  4. tables/
  5. table1.sql
  6. functions
  7. /f1.sql

More command line options

  1. java -jar scheme2ddl.jar -help
  2. ...
  3. Options:
  4. -help, -h print this message
  5. -url, DB connection URL
  6. example: scott/tiger@localhost:1521:ORCL
  7. -o, --output, output dir
  8. -p, --parallel, number of parallel thread (default 4)
  9. -s, --schemas, a comma separated list of schemas for processing
  10. (works only if connected to oracle as sysdba)
  11. -c, --config, path to scheme2ddl config file (xml)
  12. -f, --filter, filter for specific DDL objects
  13. every LIKE wildcard can be used
  14. -tf, --type-filter, filter for specific DDL object types
  15. -tfm, --type-filtermode, mode for type filter: include(default) or exclude
  16. --stop-on-warning, stop on getting DDL error (skip by default)
  17. -rsv, replace actual sequence values with 1
  18. --replace-sequence-values,
  19. -tc,--test-connection, test db connection available
  20. -version, print version info and exit

On Unix platform you can run scheme2ddl.jar as executable file:

  1. chmod +x scheme2ddl.jar
  2. ./scheme2ddl.jar

How it is work inside?

  1. First, get list of all user_object to export
  1. select * from user_objects
  1. then applying dbms_metadata.set_transform_param
  2. for every user object invoke dbms_metadata.get_ddl and dbms_metadata.get_dependent_ddl
  3. print every ddl to separate file grouped in folders like tables, views, procedures etc

scheme2ddl build on top of spring-batch framework.