Oracle Learning Note Delete example table space

Source: Internet
Author: User

Sql> drop tablespace EXAMPLE including contents and datafiles;

Drop tablespace EXAMPLE including contents and datafiles

*

ERROR at line 1:

Ora-29857:domain indexes and/or secondary objects exist in the tablespace

- -- Tips: ORA-29857: table space exists domain index and/or secondary object


sql> col owner Format A15;
sql> col segment_name format A30;
sql> col segment_type format A20;
sql> set pagesize 300;
sql> select distinct owner,segment_name,segment_type from dba_extents where Tablespace_name= ' EXAMPLE ';

owner segment_name segment_type
-------------------------------------------- ---------------------
HR Departments TABLE
oe ORDERS table
oe Promotions TABLE
PM online_media table
pm sys_lob0000051988c00006$$ lobsegment

175 rows selected.


Sql> col owner Format A15;
sql> Col segment_name format A30;
sql> Col segment_type format A20;
Sql> SELECT distinct owner,segment_name,segment_type from dba_segments where tablespace_name= ' EXAMPLE ';

OWNER segment_name Segment_type
--------------- ---------------------------------------- --------------------
SH Products_prod_cat_ix INDEX
SH CUSTOMERS TABLE
HR Departments TABLE
HR Dept_location_ix INDEX
HR Jhist_job_ix INDEX
HR Jhist_employee_ix INDEX
HR Jhist_department_ix INDEX
OE sys_lob0000051924c00023$$ lobsegment
OE ORDERS TABLE
......
SH sys_il0000052332c00002$$ Lobindex
SH sys_lob0000052332c00002$$ lobsegment

175 rows have been selected.


sql> drop user SH cascade;
User dropped.

sql> drop user PM cascade;
User dropped.

sql> drop user OE cascade;
User dropped.

sql> drop user IX cascade;
User dropped.

sql> drop user HR cascade;
User dropped.

Sql> Drop tablespace example including contents and datafiles;
Tablespace dropped.


This article is from a "a little" blog, make sure to keep this source http://pengai.blog.51cto.com/6326789/1899530

Oracle Learning Note Delete example table space

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.