undo表空间损坏的处理过程

磁碟陣列故障,分區/rman上包括undo和archivelog文件丟失,資料庫可正常重新啟動,

但是執行逻辑备份报错:
EXP-00056: ORACLE error 376 encountered
ORA-00376: file 15 cannot be read at this time
ORA-01110: data file 15: '/rman/oradata/mat/undo2.dbf'
EXP-00000: Export terminated unsuccessfully


shutdown immediate也報錯:
SQL> shutdown immediate
ORA-00376: file 15 cannot be read at this time
ORA-01110: data file 15: '/rman/oradata/mat/undo2.dbf'
--
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  823203736 bytes
Fixed Size                   452504 bytes
Variable Size             285212672 bytes
Database Buffers          536870912 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-16038: log 1 sequence# 10626 cannot be archived
ORA-19504: failed to create file ""
ORA-00312: online log 1 thread 1: '/oracle/oradata/mat/redo01.log'

解決方法:重新创建归档目录
# mkdir -p /rman/arch
# chown -R oracle:dba /rman/arch

然後open資料庫,重新创建undo表空间。

SQL> alter database open;

Database altered.

SQL> shutdown immediate
ORA-00376: file 15 cannot be read at this time
ORA-01110: data file 15: '/rman/oradata/mat/undo2.dbf'

-- 修改参数文件pfile加上如下两个参数:
$ vi initmat.ora
*._allow_resetlogs_corruption=true
*._corrupted_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)

-- 保存后用pfile启动
SQL> startup pfile=initmat.ora
-- 重新创建undo表空间
create undo tablespace undo1 datafile '/data/mat/undo1.dbf' size 100m
/
-- 切换undo表空间
alter system set undo_tablespace=undo1  scope=both;
drop tablespace UNDO2 including contents and datafiles;

-- 再次查询需要恢复的文件,已经不存在了
SQL> select * from v$recover_file;
no rows selected
-- 再次关闭数据库,并重启,沒有发现报错。
SQL> shutdown immediate

-- 把原来的参数进行修改,去掉隐含参数,再次启动
SQL> startup pfile=initmat.ora
SQL> create spfile from pfile;
SQL> shutdown immediate
SQL> startup

 

 

你可能感兴趣的:(undo表空间损坏的处理过程)