Oracle12c/11g
2006-12-07
10gR2使用RMAN恢复临时表空间的增强
我们知道在Oracle10gR2以前的版本中,如果使用RMAN恢复数据库,临时表空间的临时文件是不会自动恢复的。
这曾经引发了一系列的麻烦,很多DBA在恢复完成之后忘记添加临时文件,经常到应用出错时才能发现。
从Oracle10gR2开始,使用RMAN恢复数据库之后,Oracle会自动重新创建临时文件,由于临时文件是Sparse File,所以创建会非常迅速,通常你不会感觉得到。
以下是我曾经恢复的一段日志,其中记录了Oracle的恢复处理过程:
Thu Sep 14 22:52:06 2006
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
Thu Sep 14 22:52:06 2006
Errors in file /opt/oracle/admin/order/bdump/order_dbw0_31025.trc:
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/data1/oradata/ORDER/datafile/o1_mf_temp_28spyr8h_.tmp'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu Sep 14 22:52:06 2006
Errors in file /opt/oracle/admin/order/bdump/order_dbw0_31025.trc:
ORA-01186: file 201 failed verification tests
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/data1/oradata/ORDER/datafile/o1_mf_temp_28spyr8h_.tmp'
Thu Sep 14 22:52:06 2006
File 201 not verified due to error ORA-01157
Thu Sep 14 22:52:06 2006
Dictionary check complete
Thu Sep 14 22:52:06 2006
SMON: enabling tx recovery
Thu Sep 14 22:52:06 2006
Re-creating tempfile /data1/oradata/ORDER/datafile/o1_mf_temp_28spyr8h_.tmp as
/data1/oradata/ORDER/datafile/o1_mf_temp_2jlv4p90_.tmp
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=22, OS id=13671
Thu Sep 14 22:52:10 2006
LOGSTDBY: Validating controlfile with logical metadata
Thu Sep 14 22:52:10 2006
LOGSTDBY: Validation complete
Starting control autobackup
Control autobackup written to DISK device
handle '/opt/oracle/product/db10g/dbs/c-1341966532-20060914-03'
Completed: alter database open resetlogs
这也是Oracle10gR2的一个细致改进。
-The End-
历史上的今天
- 2021-12-07 openGauss 概述
- 2010-12-07 2010中国软件技术大会-我的主题演讲
- 2010-12-07 《会泽百家 始成江河》-DBA手记2 序言
- 2009-12-07 Oracle 11gR2 Solaris x86-64 发布
- 2009-12-07 ORA-600 17285 错误 与 PL/SQL Developer
- 2008-12-07 《深入解析Oracle》本月将与大家见面
- 2007-12-07 有多少Puber在上我的网站?
- 2005-12-07 What's the Next to be Compressed?
- 2005-12-07 Still not got my DBA
不错
使用RMAN恢复数据库,临时表空间的临时文件没有自动恢复
版本如下:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
请问具体从哪个版本开始有这个新特新的?
不好意思,rman恢复后临时表空间的临时文件确实自动创建了,但v$datafile里无对应的自动创建的临时文件的信息记录,请问此时是否还需要特别的处理?
谢谢!
临时文件从来都是在v$tempfile里记录的,v$datafile里不记录临时文件的。