Delete all objects under the current oracle user

Source: Internet
Author: User
Delete the object oracle --. SQL script-the only note is the following f: dropobj. SQL is the operation. SQL; -- your computer does not have a drive F, please replace it with D or E another drive letter -- used to delete all objects of the current user -- usefordropallobjectsincurrentuser; setheadingoff; setfeedback

Delete the object oracle --. SQL script-the only note is the following f: \ dropobj. SQL is the operation. SQL; -- your computer does not have a drive F, please replace it with D or E another drive letter -- used to delete all objects of the current user -- use for drop all objects in current user; set heading off; set feedback

Delete oracle Objects as described in the current user
--. SQL script-the only note is the following f: \ dropobj. SQL is the operation. SQL; -- your computer does not have a drive F, please replace it with D or E another drive letter -- used to delete all objects of the current user -- use for drop all objects in current user; set heading off; set feedback off; spool f: \ dropobj. SQL; prompt -- delete constraints select 'alter table' | table_name | 'drop constraint' | constraint_name | ';' from user_constraints where constraint_type = 'R '; prompt -- delete tablespace select 'drop table' | table_name | ';' from user_tables; prompt- -Delete A view select 'drop view' | view_name | ';' from user_views; prompt -- delete a digital sequence select 'drop sequence '| sequence_name |'; 'from user_sequences; prompt -- delete the function select 'drop function' | object_name | ';' from user_objectswhere object_type = 'function '; prompt -- select 'drop procedure 'When deleting a stored PROCEDURE | object_name |'; 'from user_objectswhere object_type = 'Procedure '; prompt -- delete package content select 'drop package' | o Bject_name | ';' from user_objectswhere object_type = 'package'; prompt -- delete database link select 'drop database link' | object_name | '; 'From user_objectswhere object_type = 'database link'; spool off; set heading on; set feedback on; @ f: \ dropobj. SQL; host del f: \ dropobj. SQL; -- done for drop objects in current user; -- use this entire segment in SQL * PLUS. SQL import or copy and paste directly, and press F5 to execute.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.