1. Delete All database tables Select 'drop view' | view_name | ';' | CHR (13) | CHR (10) from user_views; -------------------------------------------- Drop table lo_caseinfo; Drop table lo_harmonizecase; Drop table lo_lawcheck; Drop table lo_legislationitem; Drop table lo_trainbatch; Drop table oa_impress; Drop table oa_sysgroup; The drop statement of all tables can be copied and executed in batches at a time. You can also use the ignore parameter when using the IMP method to ignore existing objects and avoid Manual table deletion:
2. delete other data in the same way. Select 'drop view' | view_name | ';' | CHR (13) | CHR (10) from user_views; Select 'drop sequence '| sequence_name |'; '| CHR (13) | CHR (10) from user_sequences; Select 'drop function' | object_name | ';' | CHR (13) | CHR (10) from user_objects where object_type = 'function '; Select 'drop procedure '| object_name |'; '| CHR (13) | CHR (10) from user_objects where object_type = 'Procedure '; Select 'drop package' | object_name | ';' | CHR (13) | CHR (10) from user_objects where object_type = 'package ';
Parameter description: When Oracle recovers a table during data recovery, the table already exists, and you need to determine how to operate according to the ignore parameter settings. If ignore = Y, Oracle directly inserts data into the table without executing the create table statement. If the inserted record violates the constraints, such as the primary key constraint, the error record is not inserted, however, valid records are added to the table. If ignore = N, Oracle does not execute the create table statement and does not insert data into the table. Instead, it ignores the error of the table and continues to restore the next table. |