oradrop – Deleting a schema definition
Purpose
oradrop prints the drop statements for all objects in an Oracle database schema in the correct order (i.e. objects will be dropped so that no errors happen during script execution). oradrop can also be used to actually make the schema empty.
Options
oradrop supports the following options:
- -v <flag>, --verbose <flag>
Produces output (on stderr) while the database is read or written. (Valid flag values are
false,no,0,true,yesor1)
- -c <mode>, --color <mode>
Should the output (when the
-voption is used) be colored? Ifautois specified (the default) then the output is colored if stderr is a terminal. Valid modes areyes,noorauto.
- -f <mode>, --fks <mode>
Specifies how foreign keys from other schemas pointing to this schema should be treated:
keepwill not change the foreign keys in any way (this will lead to errors);disablewill disable the foreign keys anddropwill drop them completely.
- -x <flag>, --execute <flag>
When the
-xargument is given the SQL script isn’t printed on stdout, but is executed directly in the schema specified via theconnectstringoption. Be careful with this: You will have an empty schema afteroradrop -x. (Valid flag values arefalse,no,0,true,yesor1)
- -k <flag>, --keepjunk <flag>
If false (the default), database objects that have
$orSYS_EXPORT_SCHEMA_in their name will be skipped (otherwise these objects will be included in the output). (Valid flag values arefalse,no,0,true,yesor1)
- -i <flag>, --ignore <flag>
If true, any exception that occurs while the database is read or written will be ignored. (Valid flag values are
false,no,0,true,yesor1)
- --format <format>
If
--executeis not given, this determines the output format: Plain SQL (formatsql), or PySQL (formatpysql) which can be piped intoll.pysql.