Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

9

主题
1#
发表于 2013-8-29 01:46:06 | 查看: 7589| 回复: 26
刘你好,我今天 遇到如下这种情况的错误,请问您该怎么解决?劳驾您给点思路。过程如下:
1)数据库为open状态,非归档。
2)在open状态下,删除正在使用undo表空间文件
3)然后 shutdown abort
4)再次启动数据,信息如下:
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.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/opt/app/oracle/RHYS/undotbs02.dbf'
下面我改怎么恢复呢?
2#
发表于 2013-8-29 09:16:21
在mount状态下执行如下语句:
alter database datafile 'D:/datafile/test.dbf' offline drop;
alter database open;
启动数据库后创建undo表空间。

回复 只看该作者 道具 举报

3#
发表于 2013-8-29 09:24:44
sky 发表于 2013-8-29 09:16
在mount状态下执行如下语句:
alter database datafile 'D:/datafile/test.dbf' offline drop;
alter datab ...

[oracle@oracle-one ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 29 09:24:02 2013

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

Connected to an idle instance.

SQL> startup mount;
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;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/opt/app/oracle/RHYS/undotbs01.dbf'
Process ID: 1962
Session ID: 1 Serial number: 5


SQL>

回复 只看该作者 道具 举报

4#
发表于 2013-8-29 11:40:34
alter session set events  '10046 trace name context forever,level 12';
alter session set db_file_multiblocK_read_count=1;
alter database open;

==>把生成的trace上传

回复 只看该作者 道具 举报

5#
发表于 2013-8-29 12:12:40
刘,劳驾你了。谢谢。

trace.tar

610 KB, 下载次数: 2229

回复 只看该作者 道具 举报

6#
发表于 2013-8-29 13:03:52
strings system01.dbf | grep _SYSSMU | cut -d $ -f 1 | sort -u > listSMU
cat listSMU

执行上述命令, system01.dbf修改成你system数据文件的位置


alter system dump datafile 1 block 705;

alter system dump datafile 1 block 665;

回复 只看该作者 道具 举报

7#
发表于 2013-8-29 14:08:23
本帖最后由 rhys 于 2013-8-29 14:25 编辑
Maclean Liu(刘相兵 发表于 2013-8-29 13:03
strings system01.dbf | grep _SYSSMU | cut -d $ -f 1 | sort -u > listSMU
cat listSMU


刘,你好:
cat  listSMU:
[oracle@oracle-one RHYS]$ cat listSMU
              and substr(drs.segment_name,1,7) != '_SYSSMU'
D'              and substr(drs.segment_name,1,7) != ''_SYSSMU'' ' );
_SYSSMU10_2912317599
_SYSSMU1_2568952200
_SYSSMU2_3407863847
_SYSSMU3_3709763726
_SYSSMU4_1190056585
_SYSSMU5_1631096226
_SYSSMU6_1599787359
_SYSSMU7_1113629270
_SYSSMU8_2926058019
_SYSSMU9_890209428
[oracle@oracle-one RHYS]$
dump 的数据,烦请查看一下 附件。

665_block.txt

74.66 KB, 下载次数: 1032

705_block.txt

40.48 KB, 下载次数: 3

回复 只看该作者 道具 举报

8#
发表于 2013-8-29 14:29:22
把 listSMU 中_SYSSMU开头的值加入到 下面的参数中

alter system set _corrupted_rollback_segments='(_SYSSMU10_2912317599,_SYSSMU1_2568952200 ...)' scope=spfile;

shutdown immediate;
startup;

回复 只看该作者 道具 举报

9#
发表于 2013-8-29 14:40:40
Maclean Liu(刘相兵 发表于 2013-8-29 14:29
把 listSMU 中_SYSSMU开头的值加入到 下面的参数中

alter system set _corrupted_rollback_segments='(_SY ...

刘,你好:
还是不行啊。
SQL> alter system set "_corrupted_rollback_segments"='(_SYSSMU10_2912317599,_SYSSMU1_2568952200,
  2  _SYSSMU2_3407863847,_SYSSMU3_3709763726,_SYSSMU4_1190056585,_SYSSMU5_1631096226,
  3  _SYSSMU6_1599787359,_SYSSMU7_1113629270,_SYSSMU8_2926058019,_SYSSMU9_890209428)' scope=spfile;

System altered.

SQL>
SQL>
SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
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.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/opt/app/oracle/RHYS/undotbs01.dbf'
Process ID: 4485
Session ID: 1 Serial number: 5


SQL>

回复 只看该作者 道具 举报

10#
发表于 2013-8-29 14:47:30
PARSING IN CURSOR #5 len=102 dep=1 uid=0 oct=3 lid=0 tim=1376489163585231 hv=3967354608 ad='77d4ef80' sqlid='axmdf8vq7k1rh'
select increment$,minvalue,maxvalue,cycle#,order$,cache,highwater,audit$,flags from seq$ where obj#=:1
END OF STMT
PARSE #5:c=3000,e=4512,p=2,cr=29,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1376489163585230
BINDS #5:
Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=7fc91b95a010  bln=22  avl=03  flg=05
  value=1138
EXEC #5:c=1000,e=557,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=2203911306,tim=1376489163585862
WAIT #5: nam='db file sequential read' ela= 19 file#=1 block#=705 blocks=1 obj#=79 tim=1376489163585948
WAIT #5: nam='db file sequential read' ela= 10 file#=1 block#=665 blocks=1 obj#=74 tim=1376489163585993




Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0001.00e.00000304  0x00c05426.008a.20  ----    1  fsc 0x0000.00000000
0x02   0x000a.008.000002fe  0x00c0029e.00a0.1b  ----    1  fsc 0x0000.00000000


seq$ 是bootstrap对象, 他的665 块上有事务没 commit 需要回滚,由于 他是boostrap对象所以无法用_corrupted_rollback_segments 绕过

回复 只看该作者 道具 举报

11#
发表于 2013-8-29 14:49:32
方案1:

使用bbed 修改对应块,将active transaction 修改为无需回滚

回复 只看该作者 道具 举报

12#
发表于 2013-8-29 14:50:57
Maclean Liu(刘相兵 发表于 2013-8-29 14:47
PARSING IN CURSOR #5 len=102 dep=1 uid=0 oct=3 lid=0 tim=1376489163585231 hv=3967354608 ad='77d4ef80 ...

那怎么弄呢?才能恢复呢?

回复 只看该作者 道具 举报

13#
发表于 2013-8-29 21:16:46
Maclean Liu(刘相兵 发表于 2013-8-29 14:49
方案1:

使用bbed 修改对应块,将active transaction 修改为无需回滚

方案二?方案三呢?bbed,用的确实不是很熟悉啊。

回复 只看该作者 道具 举报

14#
发表于 2013-8-30 10:12:09
要修改undo$表的undo段标记为offline,不过由于数据库无法启动,需要用bbed做修改,具体的可以参考黑球球的日志:http://space.itpub.net/8242091/viewspace-690582

回复 只看该作者 道具 举报

15#
发表于 2013-8-30 10:44:20
低调小马哥 发表于 2013-8-30 10:12
要修改undo$表的undo段标记为offline,不过由于数据库无法启动,需要用bbed做修改,具体的可以参考黑球球的 ...

谢谢。我研究一下。

回复 只看该作者 道具 举报

16#
发表于 2013-8-30 16:09:39
Maclean Liu(刘相兵 发表于 2013-8-29 14:49
方案1:

使用bbed 修改对应块,将active transaction 修改为无需回滚

刘,我按照如下方式进行了修改,把所有段都改了,启动的时候使用spfile启动的,没有加隐含参数,但是结果还是不行。劳驾你,帮忙给看一下是否修改存在问题。谢谢。
BBED> map
File: /opt/app/oracle/RHYS/system01.dbf (1)
Block: 225                                   Dba:0x004000e1
------------------------------------------------------------
KTB Data Block (Table/Cluster)

struct kcbh, 20 bytes                      @0      

struct ktbbh, 48 bytes                     @20      

struct kdbh, 14 bytes                      @68      

struct kdbt[1], 4 bytes                    @82      

sb2 kdbr[11]                               @86      

ub1 freespace[5687]                        @108     

ub1 rowdata[2393]                          @5795   

ub4 tailchk                                @8188   


BBED> p kdbr
sb2 kdbr[0]                                 @86       8078
sb2 kdbr[1]                                 @88       5727
sb2 kdbr[2]                                 @90       5795
sb2 kdbr[3]                                 @92       5863
sb2 kdbr[4]                                 @94       5931
sb2 kdbr[5]                                 @96       5999
sb2 kdbr[6]                                 @98       6067
sb2 kdbr[7]                                 @100      6135
sb2 kdbr[8]                                 @102      6203
sb2 kdbr[9]                                 @104      6271
sb2 kdbr[10]                                @106      6338

BBED> p  *kdbr[10]
rowdata[611]
------------
ub1 rowdata[611]                            @6406     0x2c

BBED> x /rncnnnnnnnnnnn
rowdata[611]                                @6406   
------------
flag@6406: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@6407: 0x01
cols@6408:   17

col    0[2] @6409: 10
col   1[21] @6412: _SYSSMU10_2912317599$
col    2[2] @6434: 1
col    3[2] @6437: 3
col    4[3] @6440: 272
col    5[5] @6444: 9893752
col    6[1] @6450: 0
col    7[3] @6452: 765
col    8[3] @6456: 161
col    9[1] @6460: 0
col   10[2] @6462: 5
col   11[2] @6465: 2
col   12[0] @6468: *NULL*
col   13[0] @6469: *NULL*
col   14[0] @6470: *NULL*
col   15[0] @6471: *NULL*
col   16[2] @6472: 2


BBED> set offset 6462
        OFFSET          6462

BBED> set offset +2
        OFFSET          6464

BBED> modify /x 03
File: /opt/app/oracle/RHYS/system01.dbf (1)
Block: 225              Offsets: 6464 to 6975           Dba:0x004000e1
------------------------------------------------------------------------
0302c103 ffffffff 02c1032c 001102c1 0b155f53 5953534d 5531305f 32393132
33313735 39392402 c10202c1 0403c203 4904c364 605c0180 03c2083c 03c2023e
018002c1 0402c103 ffffffff 02c1032c 001102c1 0b155f53 5953534d 5531305f
32393132 33313735 39392402 c10202c1 0403c203 4903c35b 4f018003 c2083003
c2023d01 8002c104 02c103ff ffffff02 c1032c00 1102c103 145f5359 53534d55
325f3334 30373836 33383437 2402c102 02c10403 c2022d04 c3646102 018003c2
084b03c2 023b0180 02c10402 c103ffff ffff02c1 032c0011 02c10314 5f535953
534d5532 5f333430 37383633 38343724 02c10202 c10403c2 022d03c3 55340180
03c2083c 03c2023b 018002c1 0402c103 ffffffff 02c1032c 001102c1 04145f53
5953534d 55335f33 37303937 36333732 362402c1 0202c104 03c2023d 04c36460
64018003 c2084c03 c2023301 8002c104 02c103ff ffffff02 c1032c00 1102c104
145f5359 53534d55 335f3337 30393736 33373236 2402c102 02c10403 c2023d03
c3533601 8003c208 2d03c202 2d018002 c10402c1 03ffffff ff02c103 2c001102
c102145f 53595353 4d55315f 32353638 39353232 30302402 c10202c1 0403c202
1d04c364 60600180 03c20845 03c20226 018002c1 0402c103 ffffffff 02c1032c
001102c1 03145f53 5953534d 55325f33 34303738 36333834 372402c1 0202c104

<32 bytes per line>

BBED> sum apply
Check value for File 1, Block 225:
current = 0xbf9a, required = 0xbf9a

BBED> map
File: /opt/app/oracle/RHYS/system01.dbf (1)
Block: 225                                   Dba:0x004000e1
------------------------------------------------------------
KTB Data Block (Table/Cluster)

struct kcbh, 20 bytes                      @0      

struct ktbbh, 48 bytes                     @20      

struct kdbh, 14 bytes                      @68      

struct kdbt[1], 4 bytes                    @82      

sb2 kdbr[11]                               @86      

ub1 freespace[5687]                        @108     

ub1 rowdata[2393]                          @5795   

ub4 tailchk                                @8188   


BBED> p kdbr
sb2 kdbr[0]                                 @86       8078
sb2 kdbr[1]                                 @88       5727
sb2 kdbr[2]                                 @90       5795
sb2 kdbr[3]                                 @92       5863
sb2 kdbr[4]                                 @94       5931
sb2 kdbr[5]                                 @96       5999
sb2 kdbr[6]                                 @98       6067
sb2 kdbr[7]                                 @100      6135
sb2 kdbr[8]                                 @102      6203
sb2 kdbr[9]                                 @104      6271
sb2 kdbr[10]                                @106      6338

BBED> p * kdbr[5]
rowdata[272]
------------
ub1 rowdata[272]                            @6067     0x2c

BBED> x /rncnnnnnnnnnnnnnnnnn
rowdata[272]                                @6067   
------------
flag@6067: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@6068: 0x00
cols@6069:   17

col    0[2] @6070: 5
col   1[20] @6073: _SYSSMU5_1631096226$
col    2[2] @6094: 1
col    3[2] @6097: 3
col    4[3] @6100: 192
col    5[5] @6104: 9893791
col    6[1] @6110: 0
col    7[3] @6112: 782
col    8[3] @6116: 150
col    9[1] @6120: 0
col   10[2] @6122: 2
col   11[2] @6125: 2
col   12[0] @6128: *NULL*
col   13[0] @6129: *NULL*
col   14[0] @6130: *NULL*
col   15[0] @6131: *NULL*
col   16[2] @6132: 2


BBED> sum apply
Check value for File 1, Block 225:
current = 0xbf9a, required = 0xbf9a

BBED> sum dba 1,225 apply
Check value for File 1, Block 225:
current = 0xbf9a, required = 0xbf9a

BBED> exit

[oracle@oracle-one bbed]$ exit
logout
[root@oracle-one ~]# su - oracle
sq[oracle@oracle-one ~]$ sqlplus / as sysdba
'
SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 30 16:05:25 2013

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

Connected to an idle instance.

SQL> startup
SP2-0042: unknown command "'startup" - rest of line ignored.
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.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/opt/app/oracle/RHYS/undotbs01.dbf'
Process ID: 5828
Session ID: 1 Serial number: 5

回复 只看该作者 道具 举报

17#
发表于 2013-8-30 16:25:14
你启动的时候在加上10046看看是不是还是665这个block.如果是的可以尝试修改这个block itl flag=C试试看。

回复 只看该作者 道具 举报

18#
发表于 2013-8-30 17:01:51
改还需要改 ITL,否则没用

回复 只看该作者 道具 举报

19#
发表于 2013-8-30 19:18:42
模拟你的情况我做了一个测试下面是tracefile
  1. PARSING IN CURSOR #47510118633584 len=102 dep=1 uid=0 oct=3 lid=0 tim=1375265166576545 hv=3967354608 ad='687e34d8' sqlid='axmdf8vq7k1rh'
  2. select increment$$,minvalue,maxvalue,cycle#,order$$,cache,highwater,audit$$,flags from seq$$ where obj#=:1
  3. END OF STMT
  4. PARSE #47510118633584:c=8999,e=8834,p=2,cr=27,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1375265166576543
  5. BINDS #47510118633584:
  6. Bind#0
  7.   oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  8.   oacflg=00 fl2=0001 frm=00 csi=00 siz=24 off=0
  9.   kxsbbbfp=2b35cfbe7b78  bln=22  avl=03  flg=05
  10.   value=1172
  11. EXEC #47510118633584:c=1000,e=1213,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=2203911306,tim=1375265166577898
  12. WAIT #47510118633584: nam='db file sequential read' ela= 134 file#=1 block#=705 blocks=1 obj#=79 tim=1375265166578720
  13. WAIT #47510118633584: nam='db file sequential read' ela= 20 file#=1 block#=665 blocks=1 obj#=74 tim=1375265166579003
  14. WAIT #47510118633584: nam='control file sequential read' ela= 45 file#=0 block#=1 blocks=1 obj#=74 tim=1375265166579478
  15. WAIT #47510118633584: nam='control file sequential read' ela= 134 file#=0 block#=16 blocks=1 obj#=74 tim=1375265166579747
  16. WAIT #47510118633584: nam='control file sequential read' ela= 93 file#=0 block#=18 blocks=1 obj#=74 tim=1375265166579921
  17. WAIT #47510118633584: nam='control file sequential read' ela= 10 file#=0 block#=23 blocks=1 obj#=74 tim=1375265166580002
  18. WAIT #47510118633584: nam='control file sequential read' ela= 8 file#=0 block#=1 blocks=1 obj#=74 tim=1375265166580171
  19. WAIT #47510118633584: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=74 tim=1375265166580215
  20. WAIT #47510118633584: nam='control file sequential read' ela= 7 file#=0 block#=18 blocks=1 obj#=74 tim=1375265166580235
  21. WAIT #47510118633584: nam='control file sequential read' ela= 9 file#=0 block#=32 blocks=1 obj#=74 tim=1375265166580257
  22. DDE rules only execution for: ORA 1110
  23. ----- START Event Driven Actions Dump ----
  24. ---- END Event Driven Actions Dump ----
  25. ----- START DDE Actions Dump -----
  26. Executing SYNC actions
  27. ----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
  28. Successfully dispatched
  29. ----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (SUCCESS, 1 csec) -----
  30. Executing ASYNC actions
  31. ----- END DDE Actions Dump (total 1 csec) -----
  32. FETCH #47510118633584:c=2999,e=11520,p=2,cr=2,cu=0,mis=0,r=0,dep=1,og=4,plh=2203911306,tim=1375265166589486
  33. STAT #47510118633584 id=1 cnt=0 pid=0 pos=1 obj=74 op='TABLE ACCESS BY INDEX ROWID SEQ$$ (cr=0 pr=0 pw=0 time=153 us)'
  34. STAT #47510118633584 id=2 cnt=1 pid=1 pos=1 obj=79 op='INDEX UNIQUE SCAN I_SEQ1 (cr=1 pr=1 pw=0 time=579 us)'
  35. ORA-00604: error occurred at recursive SQL level 1
  36. ORA-00376: file 3 cannot be read at this time
  37. ORA-01110: data file 3: '/u01/app/oradata/undotbs1.dbf'
  38. ORA-00604: error occurred at recursive SQL level 1
  39. ORA-00376: file 3 cannot be read at this time
  40. ORA-01110: data file 3: '/u01/app/oradata/undotbs1.dbf'
复制代码
2.通过bbed简单的修复下
需要找个之前一个datafile的备份
  1. BBED> info
  2. File#  Name                                                        Size(blks)
  3. -----  ----                                                        ----------
  4.      1  /u01/app/oradata/system.dbf                                      64000
  5.      2  /u01/app/oradatabak/system.dbf                                   64000

  6. BBED> copy dba 2,665 to dba 1,665
  7. File: /u01/app/oradata/system.dbf (1)
  8. Block: 665              Offsets:    0 to  511           Dba:0x00400299
  9. ------------------------------------------------------------------------
  10. 06a20000 99024000 0c8f0600 00000106 64710000 01000000 4a000000 0a8f0600
  11. 00000000 02000200 00000000 02000900 e7000000 9400c000 57000e00 01200000
  12. 0b8f0600 04000d00 e2000000 a804c000 3f001b00 01200000 0c8f0600 00016200
  13. ffffd600 e6015103 51030000 6200571f 191fd11e 8f1ee903 041eb81d 6c1d2c04
  14. 211dd71c 8d1c431c 021cc11b 7f1b351b ea1aa91a 681a1f1a d6198d19 4319f918
  15. b0186618 1c18d317 91174b17 0b17c516 7b163116 e7159d15 51151015 cf148414
  16. 3914ee13 a3136113 1713cd12 82123712 ed11a211 58110e11 c4107a10 3010e60f
  17. 9c0f5b0f 1a0fd90e 980e570e 160ee601 870d7302 f30ca90c 5f0cbe02 0903820b
  18. 390bef0a a90a680a 270ae609 a1095809 0e09c408 7a083008 e6079c07 52070807
  19. be067406 2a06e005 96054c05 0205b704 6c040000 00000000 00000000 00000000
  20. 00000000 00000000 00000000 00000000 00000000 00000000 0000002c 000a03c2
  21. 333102c1 0202c102 0fce6464 64646464 64646464 64646464 01800180 02c20203
  22. c2020220 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  23. 2d2d2d2d 01802c00 0a03c233 2f02c102 02c1020f ce646464 64646464 64646464
  24. 64646401 80018002 c20203c2 0202202d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  25. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c2332e 02c10202 c1020fce

  26. <32 bytes per line>

  27. BBED> copy dba 2,705 to dba 1,705
  28. File: /u01/app/oradata/system.dbf (1)
  29. Block: 705              Offsets:    0 to  511           Dba:0x004002c1
  30. ------------------------------------------------------------------------
  31. 06a20000 c1024000 cf6e0500 00000106 12b40000 02000000 4f000000 ce6e0500
  32. 00000000 02000200 00000000 00000000 00000000 00000000 00000000 00000000
  33. 00000000 07001100 d2000000 6a23c000 38000500 01200000 cf6e0500 00008001
  34. 00000000 86003001 fd18cd17 00000000 00000000 00000000 06000000 601f0000
  35. 551f491f 3d1f311f 251f191f 0d1f011f f51ee91e dd1ed11e c51eb91e ad1ea11e
  36. 951e891e 7d1e711e 651e591e 4d1e411e 351e291e 1d1e111e 051ef91d ed1de11d
  37. d51dc91d bd1db11d a51d991d 8d1d811d 751d691d 5d1d511d 451d391d 2d1d211d
  38. 151d091d fd1cf11c e51cd91c cd1cc11c b51ca91c 9d1c911c 851c791c 6d1c611c
  39. 551c491c 3d1c311c 251c191c 0d1c011c f51be91b dd1bd11b c51bb91b ad1ba11b
  40. 951b891b 7d1b711b 651b591b 4d1b411b 351b291b 1d1b111b 051bf91a ed1ae11a
  41. d51ac91a bd1ab11a a51a991a 8d1a811a 751a691a 5c1a4f1a 421a351a 281a1b1a
  42. 0e1a011a f419e719 da19cd19 c019b319 a6199919 8c197f19 72196519 58194b19
  43. 3e193119 24191719 0a19fd18 00000000 00000000 00000000 00000000 00000000
  44. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  45. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  46. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

  47. <32 bytes per line>

  48. BBED> sum apply;
  49. Check value for File 1, Block 705:
  50. current = 0xb412, required = 0xb412

  51. BBED> verify
  52. DBVERIFY - Verification starting
  53. FILE = /u01/app/oradata/system.dbf
  54. BLOCK = 705


  55. DBVERIFY - Verification complete

  56. Total Blocks Examined         : 1
  57. Total Blocks Processed (Data) : 0
  58. Total Blocks Failing   (Data) : 0
  59. Total Blocks Processed (Index): 1
  60. Total Blocks Failing   (Index): 0
  61. Total Blocks Empty            : 0
  62. Total Blocks Marked Corrupt   : 0
  63. Total Blocks Influx           : 0
  64. Message 531 not found;  product=RDBMS; facility=BBED


  65. BBED> copy dba 2,665 to dba 1,665
  66. File: /u01/app/oradata/system.dbf (1)
  67. Block: 665              Offsets:    0 to  511           Dba:0x00400299
  68. ------------------------------------------------------------------------
  69. 06a20000 99024000 0c8f0600 00000106 64710000 01000000 4a000000 0a8f0600
  70. 00000000 02000200 00000000 02000900 e7000000 9400c000 57000e00 01200000
  71. 0b8f0600 04000d00 e2000000 a804c000 3f001b00 01200000 0c8f0600 00016200
  72. ffffd600 e6015103 51030000 6200571f 191fd11e 8f1ee903 041eb81d 6c1d2c04
  73. 211dd71c 8d1c431c 021cc11b 7f1b351b ea1aa91a 681a1f1a d6198d19 4319f918
  74. b0186618 1c18d317 91174b17 0b17c516 7b163116 e7159d15 51151015 cf148414
  75. 3914ee13 a3136113 1713cd12 82123712 ed11a211 58110e11 c4107a10 3010e60f
  76. 9c0f5b0f 1a0fd90e 980e570e 160ee601 870d7302 f30ca90c 5f0cbe02 0903820b
  77. 390bef0a a90a680a 270ae609 a1095809 0e09c408 7a083008 e6079c07 52070807
  78. be067406 2a06e005 96054c05 0205b704 6c040000 00000000 00000000 00000000
  79. 00000000 00000000 00000000 00000000 00000000 00000000 0000002c 000a03c2
  80. 333102c1 0202c102 0fce6464 64646464 64646464 64646464 01800180 02c20203
  81. c2020220 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  82. 2d2d2d2d 01802c00 0a03c233 2f02c102 02c1020f ce646464 64646464 64646464
  83. 64646401 80018002 c20203c2 0202202d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  84. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c2332e 02c10202 c1020fce

  85. <32 bytes per line>

  86. BBED> sum apply
  87. Check value for File 1, Block 665:
  88. current = 0x7164, required = 0x7164

  89. BBED> verify
  90. DBVERIFY - Verification starting
  91. FILE = /u01/app/oradata/system.dbf
  92. BLOCK = 665


  93. DBVERIFY - Verification complete

  94. Total Blocks Examined         : 1
  95. Total Blocks Processed (Data) : 1
  96. Total Blocks Failing   (Data) : 0
  97. Total Blocks Processed (Index): 0
  98. Total Blocks Failing   (Index): 0
  99. Total Blocks Empty            : 0
  100. Total Blocks Marked Corrupt   : 0
  101. Total Blocks Influx           : 0
  102. Message 531 not found;  product=RDBMS; facility=BBED


  103. BBED> exit

  104. [oracle@dg1 lib]$$ sqlplus '/as sysdba';

  105. SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 31 18:31:11 2013

  106. Copyright (c) 1982, 2010, Oracle.  All rights reserved.


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

  110. SQL> shutdown immediate;
  111. ORA-01109: database not open


  112. Database dismounted.
  113. ORACLE instance shut down.
  114. SQL>
  115. SQL>
  116. SQL> startup
  117. ORACLE instance started.

  118. Total System Global Area  217157632 bytes
  119. Fixed Size                  2225064 bytes
  120. Variable Size             159386712 bytes
  121. Database Buffers           50331648 bytes
  122. Redo Buffers                5214208 bytes
  123. Database mounted.
  124. Database opened.
  125. SQL>
复制代码

回复 只看该作者 道具 举报

20#
发表于 2013-8-30 22:02:27
vicry21 发表于 2013-8-30 19:18
模拟你的情况我做了一个测试下面是tracefile2.通过bbed简单的修复下
需要找个之前一个datafile的备份 ...

undo 块 直接cp 风险太大,非常不建议……

回复 只看该作者 道具 举报

21#
发表于 2013-8-31 11:10:52
xifenfei 发表于 2013-8-30 22:02
undo 块 直接cp 风险太大,非常不建议……

多谢飞总的提醒,
我又重新修复了下:
先修改itl flag=C
  1. BBED> p *kdbr[71]
  2. rowdata[291]
  3. ------------
  4. ub1 rowdata[291]                            @869      0x2c

  5. BBED> set offset 869
  6.         OFFSET          869

  7. BBED> x /rnnnnnnn
  8. rowdata[291]                                @869     
  9. ------------
  10. flag@869:  0x2c (KDRHFL, KDRHFF, KDRHFH)
  11. lock@870:  0x01
  12. cols@871:    10

  13. col    0[3] @872: 6139
  14. col    1[2] @876: 1
  15. col    2[2] @879: 1
  16. col   3[15] @882: 9999999999999999999999999999
  17. col    4[1] @898: 0
  18. col    5[1] @900: 0
  19. col    6[2] @902: 20
  20. col    7[3] @905: 194
  21. col   8[32] @909:  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  22. 0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  23. 0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  24. col    9[1] @942: 0


  25. BBED> modify /x 00 offset 870
  26. File: /u01/app/oradata/system.dbf (1)
  27. Block: 665              Offsets:  870 to 1381           Dba:0x00400299
  28. ------------------------------------------------------------------------
  29. 000a03c2 3e2802c1 0202c102 0fce6464 64646464 64646464 64646464 01800180
  30. 02c11503 c2025f20 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  31. 2d2d2d2d 2d2d2d2d 01802c00 0a03c23e 2802c102 02c1020f ce646464 64646464
  32. 64646464 64646401 80018002 c11502c1 61202d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  33. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d0180 2c000a03 c23e2802 c10202c1
  34. 020fce64 64646464 64646464 64646464 64018001 8002c115 03c2020e 202d2d2d
  35. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d01802c
  36. 000a03c2 035c02c1 0202c102 05c4051e 324402c1 02018002 c30204c3 02010220
  37. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  38. 01802c00 0a03c204 3f02c102 02c10202 c51502c1 02018002 c30204c3 05011020
  39. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  40. 01802c00 0a03c24f 1c02c102 02c1020f ce646464 64646464 64646464 64646401
  41. 8002c102 02c10302 c102202d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  42. 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c24f09 02c10202 c1020fce 64646464
  43. 64646464 64646464 64640180 02c10202 c11502c1 02202d2d 2d2d2d2d 2d2d2d2d
  44. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d0180 2c000a03 c24e5902

  45. <32 bytes per line>

  46. BBED> p *kdbr[70]
  47. rowdata[216]
  48. ------------
  49. ub1 rowdata[216]                            @794      0x2c

  50. BBED> set offset 794
  51.         OFFSET          794

  52. BBED> x /rnnnnnn
  53. rowdata[216]                                @794     
  54. ------------
  55. flag@794:  0x2c (KDRHFL, KDRHFF, KDRHFH)
  56. lock@795:  0x02
  57. cols@796:    10

  58. col    0[3] @797: 6134
  59. col    1[2] @801: 1
  60. col    2[2] @804: 1
  61. col   3[15] @807: 9999999999999999999999999999
  62. col    4[1] @823: 0
  63. col    5[1] @825: 0
  64. col    6[2] @827: 20
  65. col    7[3] @830: 163
  66. col   8[32] @834:  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  67. 0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  68. 0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d  0x2d
  69. col    9[1] @867: 0


  70. BBED> modify /x 00 offset 795
  71. File: /u01/app/oradata/system.dbf (1)
  72. Block: 665              Offsets:  795 to 1306           Dba:0x00400299
  73. ------------------------------------------------------------------------
  74. 000a03c2 3e2302c1 0202c102 0fce6464 64646464 64646464 64646464 01800180
  75. 02c11503 c2024020 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  76. 2d2d2d2d 2d2d2d2d 01802c00 0a03c23e 2802c102 02c1020f ce646464 64646464
  77. 64646464 64646401 80018002 c11503c2 025f202d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  78. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c23e28 02c10202
  79. c1020fce 64646464 64646464 64646464 64640180 018002c1 1502c161 202d2d2d
  80. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d01802c
  81. 000a03c2 3e2802c1 0202c102 0fce6464 64646464 64646464 64646464 01800180
  82. 02c11503 c2020e20 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  83. 2d2d2d2d 2d2d2d2d 01802c00 0a03c203 5c02c102 02c10205 c4051e32 4402c102
  84. 018002c3 0204c302 0102202d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  85. 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c2043f 02c10202 c10202c5 1502c102
  86. 018002c3 0204c305 0110202d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d
  87. 2d2d2d2d 2d2d2d2d 2d2d2d01 802c000a 03c24f1c 02c10202 c1020fce 64646464
  88. 64646464 64646464 64640180 02c10202 c10302c1 02202d2d 2d2d2d2d 2d2d2d2d
  89. 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d2d2d 2d2d0180 2c000a03 c24f0902

  90. <32 bytes per line>

  91. BBED> sum apply
  92. Check value for File 1, Block 665:
  93. current = 0x9c63, required = 0x9c63

  94. BBED> verify
  95. DBVERIFY - Verification starting
  96. FILE = /u01/app/oradata/system.dbf
  97. BLOCK = 665


  98. DBVERIFY - Verification complete

  99. Total Blocks Examined         : 1
  100. Total Blocks Processed (Data) : 1
  101. Total Blocks Failing   (Data) : 0
  102. Total Blocks Processed (Index): 0
  103. Total Blocks Failing   (Index): 0
  104. Total Blocks Empty            : 0
  105. Total Blocks Marked Corrupt   : 0
  106. Total Blocks Influx           : 0
  107. Message 531 not found;  product=RDBMS; facility=BBED
复制代码
然后重新打开数据库

  1. SQL> shutdown immediate;
  2. ORA-01109: database not open


  3. Database dismounted.
  4. ORACLE instance shut down.
  5. SQL>
  6. SQL>
  7. SQL> startup
  8. ORACLE instance started.

  9. Total System Global Area  217157632 bytes
  10. Fixed Size                  2225064 bytes
  11. Variable Size             159386712 bytes
  12. Database Buffers           50331648 bytes
  13. Redo Buffers                5214208 bytes
  14. Database mounted.
  15. Database opened.
  16. SQL>
复制代码

回复 只看该作者 道具 举报

22#
发表于 2013-8-31 11:50:05
vicry21 发表于 2013-8-31 11:10
多谢飞总的提醒,
我又重新修复了下:
先修改itl flag=C然后重新打开数据库 ...

修改itl的方式,然我觉得很奇怪,看了半天,才看明白

回复 只看该作者 道具 举报

23#
发表于 2013-8-31 15:05:48
xifenfei 发表于 2013-8-31 11:50
修改itl的方式,然我觉得很奇怪,看了半天,才看明白

飞总,这样子修复对不?

回复 只看该作者 道具 举报

24#
发表于 2013-9-1 22:41:45
Maclean Liu(刘相兵 发表于 2013-8-30 17:01
改还需要改 ITL,否则没用

刘,你好:
   感谢你帮助,目前数据库打开了,但是在重新创建或是删除undo的时候都提示同样的错误:
SQL> drop tablespace undotbs1;
drop tablespace undotbs1
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [4511], [], [], [], [], [], [], [],
[], [], [], []

是否线exp数据后,然后再创建实例在imp数据这一种方法?请你指点一下,谢谢。

回复 只看该作者 道具 举报

25#
发表于 2013-9-2 09:22:14
给出  4511的trace

回复 只看该作者 道具 举报

26#
发表于 2013-9-2 09:29:04
ORA-600 [4511] "Row locked by inactive ITL"

If you know the table(s) involved, use ANALYZE TABLE <table_name>
  VALIDATE STRUCTURE CASCADE; to check for possible problems.

  Run DBVERIFY on any datafiles associated with the table(s)

  This can be related to a Consistent Read (CR) problem, so shutdown and
  restart the instance and see if the problem reproduces.

  Submit all trace files and the alert.log to Oracle Support Services
  for further review and analysis.

回复 只看该作者 道具 举报

27#
发表于 2013-9-2 15:04:08
Maclean Liu(刘相兵 发表于 2013-9-2 09:22
给出  4511的trace

刘你好,这是收集的信息。请查看。谢谢你。

RHYS_ora_5220.txt

3.14 KB, 下载次数: 1611

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2025-1-4 07:18 , Processed in 0.061929 second(s), 23 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569