admin管理员组

文章数量:1654386

146.Identify three situations in which you would NOT be able to drop a tablespace. (Choose three.)
A.when the tablespace is online
B.when the tablespace has segments with data in it
C.when the tablespace is a default permanent tablespace for the database
D.when the tablespace contains a table that is currently being used by transactions
E.when the tablespace contains undo data that is needed to rollback an uncommitted transaction
答案:CDE
解析:参考:http://docs.oracle/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN11383
删除表空间的要求
1.用户具有权限
2.表空间中的内容不再需要了
3.You cannot drop a tablespace that contains any active segments.
  For example, if a table in the tablespace is currently being used or the tablespace contains undo data needed to roll back uncommitted transactions, you cannot drop the tablespace. The tablespace can be online or offline, but it is best to take the tablespace offline before dropping it.
  (DE正确)
4.默认表空间不可以删除没有找到,我们测试一下
SQL> select property_value from database_properties where property_name='DEFAULT_PERMANENT_TABLESPACE';
PROPERTY_VALUE
--------------------------------------------------------------------------------
USERS
--现在是users表空间
SQL> create tablespace user2 datafile '/u01/oracle/oradata/wahaha3/users2.dbf' size 20m;
Tablespace created.
--我们新创建一个表空间,这个时候这个表空间中应该啥也没有
SQL> alter database default tablespace user2;
Database altered.
--修改默认的表空间
SQL> select property_value from database_properties where property_name='DEFAULT_PERMANENT_TABLESPACE';
PROPERTY_VALUE
--------------------------------------------------------------------------------
USER2
--验证
SQL> drop tablespace user2;
drop tablespace user2
*
ERROR at line 1:
ORA-12919: Can not drop the default permanent tablespace
--删不掉,提示不能删除默认表空间
[oracle@wahaha3 ~]$ oerr ora 12919
12919, 00000, "Can not drop the default permanent tablespace"
// *Cause:  An attemp was made to drop the default permanent tablespace
// *Action: Make a different tablespace as the default permanent tablespace
//          and reissue the drop  

本文标签: situationsidentifychooseTablespaceDrop