> drop tablespace tbsocp11_a including contents and datafiles;
drop tablespace tbsocp11_a including contents and datafiles
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-01422: exact fetch returns more than requested number of rows请问是什么原因?如果解决?谢谢!
drop tablespace tbsocp11_a including contents and datafiles
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-01422: exact fetch returns more than requested number of rows请问是什么原因?如果解决?谢谢!
drop tablespace tbsocp11_a;
purge recyclebin; 2)先删除用户,再删除表空间
drop user 用户名 casacade;
drop tablespace 表空间名 including contents; 3)在user_constraints中找到对应的constrait_name,然后再将该contraint drop或disable掉
SELECT t.owner, t.table_name, i.index_name
FROM dba_tables t, dba_indexes i
WHERE t.owner = i.owner
AND t.table_name = i.table_name
AND i.tablespace_name = upper('要删除表空间')
AND t.tablespace_name <> upper('要删除表空间'); select * from user_constraints c where table_name =UPPER('表名') and c.constraint_name='约束名'
alter table 表名 drop constraint 约束名;
drop tablespace tablespace_name including contents cascade constraints;
(1)用户还在用别的表空间,怎么能为了删除一个不用的表空间而删除用户?
(2)要删除的表空间中只有一个普通的表,没有任何约束:
create table hr.test tablespace tbsocp11_a as select * from dba_source;
SQL> create table hr.ttt as select * from dual;Table created.SQL> select * from hr.ttt;D
-
X
YSQL> delete from dual where dummy='Y';1 row deleted.SQL> commit;Commit complete.SQL> drop table hr.ttt purge;Table dropped.SQL> create table hr.ttt as select * from dual;Table created.SQL> select * from hr.ttt;D
-
XSQL> drop table hr.ttt purge;Table dropped.SQL> drop tablespace tbsocp11_a including contents and datafiles;Tablespace dropped.