HomePython softwarell.orasqlscriptsoradrop

ll.orasql.scripts.oradrop

Script for deleting an Oracle 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:

connectstring

An Oracle connectstring.

-v, --verbose (false, no, 0, true, yes or 1)

Produces output (on stderr) while the database is read or written.

-c, --color (yes, no or auto)

Should the output (when the -v option is used) be colored? If auto is specified (the default) then the output is colored if stderr is a terminal.

-f, --fks (keep, disable, drop)

Specifies how foreign keys from other schemas pointing to this schema should be treated: keep will not change the foreign keys in any way (this will lead to errors); disable will disable the foreign keys and drop will drop them completely.

-x, --execute (false, no, 0, true, yes or 1)

When the -x argument is given the SQL script isn't printed on stdout, but is executed directly. Be careful with this: You will have an empty schema after oradrop -x.

-k, --keepjunk (false, no, 0, true, yes or 1)

If true (the default), database objects that have $ or SYS_EXPORT_SCHEMA_ in their name will be skipped (otherwise these objects will be included in the output).

-i, --ignore (false, no, 0, true, yes or 1)

If true, any exception that occurs while the database is read or written will be ignored.

--format (sql or pysql)

If --execute is not given, this determines the output format: Plain SQL, or PySQL which can be piped into ll.pysql.

--include (regexp)

Only include objects in the output if their name contains the regular expression.

--exclude (regexp)

Exclude objects from the output if their name contains the regular expression.

def main​(args=None):

Alternate versions   Text   XIST   Python