临时表空间的临时文件损害,解决办法就是,增长一个新的临时文件,把老的给删除了就行。数据库
ocp 053oracle
699. Your database is using a default temporary tablespace that contains the temp01.tmp temporary file.app
All the users on the database use the default temporary tablspace. A user issues a query on the ORDERSthis
table and receives the following error:spa
What would be the most efficient way to rectify this error?rest
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.ci
C.Allow the database to continue runn ing, drop the temp01.tmp temporary file, and then re-create it with new tempfiles.it
D.Take the temporary tablespace offline, recover the missing tempfile by applying redo logs, and then bring the temporary tablespace online. table
Answer: D
答案解析:
临时文件在删除后,数据库再次启动时会自动建立。
而且在数据库运行的过程当中,使用rm删除,并不影响排序的查询。
我不会模拟出临时文件损坏的状况,可是,在临时文件损坏的状况下,能够增长一个临时文件,而后drop那个损坏的,就能够了。
另外A和C的区别就是先删除仍是先增长?经过如下可知,当只有一个临时文件的时候,是不容许删除的。
故选A,此题答案有误。
sys@TEST1107> ALTER TABLESPACE TEMP DROP TEMPFILE '/u01/app/oracle/oradata/test1107/temp01.dbf';
ALTER TABLESPACE TEMP DROP TEMPFILE '/u01/app/oracle/oradata/test1107/temp01.dbf'
*
ERROR at line 1:
ORA-03261: the tablespace TEMP has only one file