ITPub博客

首页 > 数据库 > Oracle > 1Z0-053 V13.02 Q699

1Z0-053 V13.02 Q699

原创 Oracle 作者:cow977 时间:2016-07-21 10:56:45 0 删除 编辑
699. Your database is using a default temporary tablespace that contains the temp01.tmp temporary file.
All the users on the database use the default temporary tablspace. A user issues a query on the ORDERS table and receives the following error:

What would be the most efficient way to rectify this error?
A.Add a new tempfile to the user’s temporary tablespace and drop the tempfile that produced the error.
B.Shut down the database instance, restore the temp01.tmp file from the backup, and then restart the database.
C.Allow the database to continue runn ing, drop the temp01.tmp temporary file, and then re-create it with new tempfiles.
D.Take the temporary tablespace offline, recover the missing tempfile by applying redo logs, and then bring the temporary tablespace online.
Answer: C

正确答案应该是A。

在表空间只有一个数据文件的情况下,是不允许删除数据文件的。

SQL> select name from v$tempfile;

NAME
----------------------------------------------------------------------------------------------------
C:\APPS\ORACLE\ORADATA\COW\TEMP02.DBF

SQL> alter tablespace temp drop tempfile 'C:\APPS\ORACLE\ORADATA\COW\TEMP02.DBF';
alter tablespace temp drop tempfile 'C:\APPS\ORACLE\ORADATA\COW\TEMP02.DBF'
*
第 1 行出现错误:
ORA-03261: 表空间 TEMP 只有一个文件


SQL> alter tablespace temp add tempfile 'C:\APPS\ORACLE\ORADATA\COW\TEMP01.DBF' size 100M;

表空间已更改。

SQL> alter tablespace temp drop tempfile 'C:\APPS\ORACLE\ORADATA\COW\TEMP02.DBF';

表空间已更改。

SQL> select name from v$tempfile;

NAME
------------------------------------------------------------------------------------
C:\APPS\ORACLE\ORADATA\COW\TEMP01.DBF

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/81227/viewspace-2122329/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 1Z0-053 V13.02 Q698
下一篇: 1Z0-053 V13.02 Q700
请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    698
  • 访问量
    894416