This is a simple tool to extract objects DDL from Oracle Database and store them in files.
- Python 3.6+
- Database user with
SELECT_CATALOG_ROLE
andCREATE SESSION
privileges
If SELECT_CATALOG_ROLE
is not allowed, you can grant privileges listed in privileges.sql to the user.
pip install -r requirements.txt
Rename config_con.template.yaml to config_con.yaml
and edit it with your database connection parameters.
File names, output directory and other settings can be changed in config.yaml.
python main.py [-s <schema name>]
Where schema_name
is the name of the schema to extract. If not specified, connection user will be used.
For example:
python main.py -s HR
or:
python main.py
- Tables
- Columns
- Constraints
- Partitions (sub-partitions and reference partitions are not implemented yet)
- Storage parameters (LOB storage parameters are not implemented yet)
- Indexes
- Comments
- Grants