Delete an Oracle user's object

xiaoxiao2021-03-06  73

- Remove the object set heading off; set feedback off; spool c: /dropobj.sql; prompt --drop tables select 'drop table' || Table_name || ';' || CHR (13) | | chr (10) from user_tables; prompt --drop view select 'Drop view' || view_name || ';' || CHR (13) || CHR (10) from user_views; prompt --drop sequence select 'Drop Sequence '|| SEQUENCE_NAME ||'; '|| CHR (13) || CHR (10) from user_sequences; prompt --drop function select' Drop function '|| Object_name ||'; '|| CHR (13) || CHR (10) from user_objects where object_type = 'function';

prompt --Drop procedure select 'drop procedure' || object_name || ';' || chr (13) || chr (10) from user_objects where object_type = 'PROCEDURE'; prompt --Drop package select 'drop package' | | Object_name || ';' || CHR (13) || CHR (10) from user_Objects where object_type = 'package'; spool off; set heading on; set feedback on; SEED FEEDBACK ON;

@@ c: /dropobj.sql; Host del C: /Dropobj.sql;

转载请注明原文地址:https://www.9cbs.com/read-121446.html

New Post(0)