ORACLE's Daily approach

Source: Internet
Author: User

Methods for Oracle to delete all tables under the current user

1. If you have permission to delete a user, you can:

Drop user user_name cascade;

Add the cascade can delete the user data.

Delete and then create the user. --Create Admin user user name identified by password default tablespace space_data (tablespace name) temporary tablespace space_temp (temporary tablespace name); --authorizing grant CONNECT,DBA to username; --Modify the quota alter user "username" QUOTA UNLIMITED on Space_data (tablespace name);

--View all user objects Select Uo.object_name,uo.object_type from User_objects uo where uo.object_type<> ' LOB ' ORDER by Uo.object_type desc

2, if you do not delete the user's rights, you can do:

Select ' Drop table ' | | table_name| | '; ' from cat where table_type= ' table '

Will output a batch of SQL statements to delete the table, these SQL statements can be executed. (Requires permission to drop table)


Methods of database cleanup

1. Table spatial Data Cleanup Main cleanup response, report 2, Query Table Space Association Select segment_name table name, partition_name partition name, Tablespace_name table space from Dba_segmen TS where tablespace_name= ' REPORT201303 '

3. Clear database tables using TABLESPACE data ALTER TABLE Tl_log_stdreport TRUNCATE partition REPORT201208

4. Delete table space ALTER TABLE Tl_log_stdreport drop partition REPORT201201

5. Free the deleted tablespace disk space select * from dba_data_files where tablespace_name= ' RESP201302 '

--depending on the tablespace ID alter DATABASE datafile resize 1M

6. Oracle Console eliminates table space

ORACLE's Daily approach

Related Article

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.