In order to build a test library in the project, often encounter to clear the current library, is a toss, spare time, write a script to stay as a backup.
The script is as follows:
Select '--clear table ' from dual union ALL SELECT ' Drop table ' | | A.table_name | | ' | | '; ' from user_tables a UNION ALL select '--clear sequence ' from dual--Qing sequence union ALL select ' Drop sequence ' | | a.sequence_name| | ' | | '; ' from user_sequences A--clear stored Procedure UNION ALL SELECT '--clear stored procedure ' from dual union ALL SELECT ' drop procedure ' | | a.object_name| | ' | | '; ' From User_procedures a where a.object_type= ' PROCEDURE '--Clear Package UNION ALL SELECT '--clear package ' from dual union ALL select DISTINCT ' Drop Package ' | | a.object_name| | ' | | '; ' From User_procedures a where a.object_type= ' package ' union ALL SELECT '--Clear custom function ' from dual union ALL select ' Drop functio N ' | | a.object_name| | ' | | '; ' From User_procedures a WHERE a.object_type = ' FUNCTION '
After a copy of the command that automatically survives after running in PL/SQL,
Create a new command window, paste the copied command into the window, and run it directly.
Finally, the following statement is executed to generate the Guide-Library statement
--Import Library
Select ' Imp username/password @ database file= ' | | ' DMP file ' | | ' Full=y ' from dual
Open the cmd window, mark the above copy of the Guide Library command, modify, enter.
--Export Library
SELECT ' Exp username/password @ database file= ' | | ' DMP file ' | | ' Full=y ' from dual
Oracle Automatic Survival Clearance script