日期:2014-05-16  浏览次数:20668 次

undo损坏故障恢复(二)ORA-01092,ORA-00604,ORA-01110

undo 故障诊断与恢复(二)

今天是2013-09-01,目前困扰我将近一周的问题,终于解决了,我非常感谢帮助我的朋友,也非常感谢管我要钱然后替我解决问题的朋友(我没采用)。这更激发了我一定要解决这个问题的斗志。
我写这篇笔记,就是为了帮助那些遇到同样困难的朋友,我觉得‘闻道有先后,术业有专攻’,没有人是无法被取代的。如果有朋友搜到我这篇文章,希望我能给你带来问题的解决办法。
先描述一下,我模拟的这种问题的情景:
1)数据处于open状态,非归档,无备份
2)直接rm掉undo表空间的所有数据文件
3)直接使用shutdown abort 关闭数据

首先使用一般方法进行恢复:


 

*.undo_management='MANUAL'
*.undo_tablespace='UNDOTBS1'
_corrupted_rollback_segments=(_SYSSMU10_2912317599$,_SYSSMU1_2568952200$,_SYSSMU2_3407863847$,_SYSSMU3_3709763726$,_SYSSMU4_1190056585$,_SYSSMU5_1631096226$,_SYSSMU6_1599787359$,_SYSSMU7_1113629270$,_SYSSMU8_2926058019$,_SYSSMU9_890209428$)
"pfile.ora" 177L, 6491C written                                                                                                                     
[oracle@oracle-one ~]$ sqlplsu / as sysdba
-bash: sqlplsu: command not found
[oracle@oracle-one ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 14 21:19:27 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount pfile='/home/oracle/pfile.ora';
ORACLE instance started.

Total System Global Area  405020672 bytes
Fixed Size                  2213816 bytes
Variable Size             251660360 bytes
Database Buffers          146800640 bytes
Redo Buffers                4345856 bytes
Database mounted.
SQL> alter database datafile '/opt/app/oracle/RHYS/undotbs01.dbf' offline drop;

Database altered.

SQL> alter database open;

Database altered.

SQL>

无论采用重新重建undo或是加入隐含参数._corrupted_rollback_segments,_offline_rollback_segments都无济于事可以尝试采用如下步骤。
步骤如下:
[root@oracle-one ~]# su - oracle
[oracle@oracle-one ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 14 21:09:31 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter database open;

Database altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

1)首先启动数据库

SQL> startup
ORACLE instance started.

Total System Global Area  405020672 bytes
Fixed Size                  2213816 bytes
Variable Size             251660360 bytes
Database Buffers          146800640 bytes
Redo Buffers                4345856 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise