臨時表空間的臨時文件損害,解決辦法就是,增長一個新的臨時文件,把老的給刪除了就行。數據庫
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