模拟有末提交的undo丢失,如何处理 。
相关版本 oracle 11.2.0.4 非归档 无备份
场景1:
SQL> create table t as select * from dba_objects;
Table created.
SQL> insert into t select * from t;
86267 rows created.
在另外一窗口中,执行
[oracle@rac01 orcl]$ ll
total 1536372
-rw-r----- 1 oracle oinstall 9748480 Jul 11 16:27 control01.ctl
-rw-r----- 1 oracle oinstall 52429312 Jul 11 14:00 redo01.log
-rw-r----- 1 oracle oinstall 52429312 Jul 11 16:27 redo02.log
-rw-r----- 1 oracle oinstall 52429312 Jul 11 06:00 redo03.log
-rw-r----- 1 oracle oinstall 545267712 Jul 11 16:27 sysaux01.dbf
-rw-r----- 1 oracle oinstall 796925952 Jul 11 16:27 system01.dbf
-rw-r----- 1 oracle oinstall 20979712 Jul 11 15:42 temp01.dbf
-rw-r----- 1 oracle oinstall 57679872 Jul 11 16:27 undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072 Jul 11 14:05 users01.dbf
[oracle@rac01 orcl]$ mv undotbs01.dbf undotbs01.dbf.bak
打开数据库出现如下错误。
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1006636072 bytes
Database Buffers 637534208 bytes
Redo Buffers 7094272 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
ORA-01110: data file 3: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
分析,如果此时UNDO丢失,因为是shutdown abort的,数据库要回滚,但不见UNDO,此时,
数据库没有OPEN,不能建UNDO,不能查询哪些回滚段有问题?请大家指点。
在11g之前的版本中,回滚段名称是”_SYSTEMn$”之类,而到了11g回滚段的名称变为了”_SYSTEMn_时间戳$”,因为时间戳我们不知道,所以我们不能通过n的值,来确定回滚段的名称,从而也就不能很明确的使用_offline_rollback_segments和_corrupted_rollback_segments来标明异常回滚段。 大神刘呢? FYI
http://www.askmaclean.com/archives/overcome-ora-600-4xxx-open-database.html
SQL> select name from v$datafile where file#=1;
NAME
--------------------------------------------------------------------------------------------------------------------------------------------
+DATA1/pd003/datafile/system.259.858135521
and Real Application Testing options
$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 14 22:39:47 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PD003 (DBID=1735326005)
RMAN> copy datafile 1 to '/s01/dbf1';
$ strings dbf1 | grep _SYSSMU | cut -d $ -f 1 | sort -u > listSMU
$ cat listSMU
and substr(drs.segment_name,1,7) != '_SYSSMU'
<D' and substr(drs.segment_name,1,7) != ''_SYSSMU'' ' );
_SYSSMU10_3271578125
_SYSSMU10_960603280
_SYSSMU11_125382609
_SYSSMU1_1240252155
_SYSSMU12_2245433549
_SYSSMU13_3242268464
_SYSSMU1_3728092404
_SYSSMU14_44821983
_SYSSMU15_1872739176
_SYSSMU16_1376564431
_SYSSMU17_1839632768
_SYSSMU18_3088942417
_SYSSMU19_2867910983
_SYSSMU20_948290921
_SYSSMU2_111974964
_SYSSMU2_2850105180
_SYSSMU3_4004931649
_SYSSMU3_4160240979
_SYSSMU4_1126976075
_SYSSMU4_348804819
_SYSSMU5_2968973961
_SYSSMU5_4011504098
_SYSSMU6_2060978448
_SYSSMU6_3654194381
_SYSSMU7_4222772309
_SYSSMU7_894058185
_SYSSMU8_3612859353
_SYSSMU8_87803851
_SYSSMU9_2370500926
_SYSSMU9_3945653786
页:
[1]