oracle 学习笔记 删除example表空间

前端之家收集整理的这篇文章主要介绍了oracle 学习笔记 删除example表空间前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

---提示ORA-29857:表空间存在域索引和/次级对象


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
SH SYS_LOB0000052332C00002$$ 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_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行。

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.

原文链接:/oracle/210490.html

猜你在找的Oracle相关文章