-
Notifications
You must be signed in to change notification settings - Fork 47
Home
scheme2ddl - 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.
Current released version is 2.3.3
scheme2ddl give ability to filter undesirable information, separate DDL in different files, pretty format output.
Java must be installed on your computer. For exporting oracle scheme you must provide
- DB connection string
- output directory Usage example. Command
java -jar scheme2ddl.jar -url scott/tiger@localhost:1521:ORCL -o C:/temp/oracle-ddl2svn/
will produce directory tree
views/
view1.sql
view2.sql
tables/
table1.sql
functions
/f1.sql
More command line options
java -jar scheme2ddl.jar -help
...
Options:
-help, -h print this message
-url, DB connection URL
example: scott/tiger@localhost:1521:ORCL
-o, --output, output dir
-p, --parallel, number of parallel thread (default 4)
-s, --schemas, a comma separated list of schemas for processing
(works only if connected to oracle as sysdba)
-c, --config, path to scheme2ddl config file (xml)
--stop-on-warning, stop on getting DDL error (skip by default)
-tc,--test-connection, test db connection available
-version, print version info and exit
- First, get list of all user_object to export
select * from user_objects
- then applying dbms_metadata.set_transform_param
- for every user object invoke dbms_metadata.get_ddl and dbms_metadata.get_dependent_ddl
- print every ddl to separate file grouped in folders like tables, views, procedures etc
scheme2ddl build on top of spring-batch framework.
You can see it in action as Jenkins build. Look at console output and build artifacts.
Jenkins hosting provided by Red Hat's OpenShift. Oracle hosting provided by Amazon's RDS.
Avialable in local maven repo: https://scheme2ddl.googlecode.com/svn/m2/