Purpose
oradelete prints the delete statements for all tables in an Oracle database
schema in the correct order (i.e. records will be deleted so that no errors
happen during script execution). oradelete can also be used to actually
make all tables empty.
Options
oradelete supports the following options:
connectstringAn Oracle connectstring.
-v,--verbose(false,no,0,true,yesor1)Produces output (on stderr) while the database is read or written.
-c,--color(yes,noorauto)Should the output (when the
-voption is used) be colored? Ifautois specified (the default) then the output is colored if stderr is a terminal.-s,--sequences(false,no,0,true,yesor1)Should sequences be reset to their initial values?
-x,--execute(false,no,0,true,yesor1)When the
-xargument is given the SQL script isn't printed on stdout, but is executed directly. Be careful with this: You will have empty tables afteroradelete -x.-k,--keepjunk(false,no,0,true,yesor1)If true (the default), database objects that have
$orSYS_EXPORT_SCHEMA_in their name will be skipped (otherwise these objects will be included in the output).-i,--ignore(false,no,0,true,yesor1)If true, any exception that occurs while the database is read or written will be ignored.
-t,--truncate(false,no,0,true,yesor1)If given the script uses the
TRUNCATEcommand instead of theDELETEcommand.--format(sqlorpysql)If
--executeis not given, this determines the output format: Plain SQL, or PySQL which can be piped intoll.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.