全部博文(389)
分类: Oracle
2013-12-16 22:12:15
块的延迟清洗处理一则
数据无法启动,报4194错误.通过undo_management=manual处理,然后再增加一个新的undo
tablespace,原有的undo1文件损坏
打开数据库时报
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/u01/app/oracle/oradata/t/undo01.dbf'
SQL> alter database datafile 5 offline for drop;
Database altered.
删除文件,数据顺利打开,在查询表时报无法锁定的错误
SQL> select count(*) from frank.t1;
select count(*) from frank.t1
*
ERROR at line 1:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/u01/app/oracle/oradata/t/undo01.dbf'
看来还是没有清理干净,由于在这个表上的数据块的信息有对应在原来损坏的undo1上
在做select时,需要进行块清洗,但是对应的undo文件已经被删除了,导致无法去读
取.
直接删除表空间报错
SQL> drop tablespace undo2;
drop tablespace undo2
*
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU11_1387200382$' found, terminate
dropping tablespace
看来只能通过_offline_rollback_segments,把该表空间所有的undo segment进行离线了.
SQL> alter system set "_offline_rollback_segments"='_SYSSMU12_1387200382$','_SYSSMU13_1387200382$',
2 '_SYSSMU14_1387200382$','_SYSSMU14_1387200382$','_SYSSMU15_1387200382$','_SYSSMU17_1387200382$','_SYSSMU18_1387200382$',
3 '_SYSSMU19_1387200382$','_SYSSMU20_1387200382$','_SYSSMU16_1387200382$' scope=spfile;
System altered.
SQL> drop tablespace undo2;
Tablespace dropped.
SQL> select count(*) from frank.t1;
COUNT(*)
----------
68691
查询成功.