- SQL> alter tablespace htyansp online;
- alter tablespace htyansp online
- *
- ERROR at line 1:
- ORA-01190: control file or data file 6 is from before the last RESETLOGS
- ORA-01110: data file 6: '/u01/app/oracle/oradata/huateng/htyansp01.dbf'
这是由于数据文件头记录的RESETLOG SCN 及其RESETLOG COUNT与 控制文件中的不一致。
如下所示:
- SQL> select to_char(RESETLOGS_CHANGE#,'xxxxxxxx'),to_char(PRIOR_RESETLOGS_CHANGE#,'xxxxxxxx')
- from v$database;
- TO_CHAR(R TO_CHAR(P
- --------- ---------
- 20704c 206c94
数据文件记录的本次RESETLOGS SCN为 0x20704c ,上一次为0x206c94 。
BBED查看到这个文件头记录的RESETLOG SCN 及其RESETLOG COUNT 为 上次的,如下所示:
- ub4 kcvfhrlc @112 0x2f2a2021
struct kcvfhrls, 8 bytes @116
ub4 kscnbas @116 0x00206c94
- ub2 kscnwrp @120 0x0000
正常文件的RESETLOG SCN为如下:
ub4 kcvfhrlc @112 0x2f2a23d8
struct kcvfhrls, 8 bytes @116
ub4 kscnbas @116 0x0020704c
ub2 kscnwrp @120 0x0000
如果没有备份的话,可以通过BBED来修复:
- BBED> set offset 116
- OFFSET 116
- BBED> dump /v count 16
- File: /u01/app/oracle/oradata/huateng/htyansp01.dbf (0)
- Block: 1 Offsets: 116 to 131 Dba:0x00000000
- -------------------------------------------------------
- 946c2000 00000000 00000000 00000000 l .l .............
- <16 bytes per line>
- BBED> set mode edit
- MODE Edit
- BBED> modify /x 4c70
- Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
- File: /u01/app/oracle/oradata/huateng/htyansp01.dbf (0)
- Block: 1 Offsets: 116 to 131 Dba:0x00000000
- ------------------------------------------------------------------------
- 4c702000 00000000 00000000 00000000
- <32 bytes per line>
- BBED> set offset 112
- OFFSET 112
- BBED> dump /v count 16
- File: /u01/app/oracle/oradata/huateng/htyansp01.dbf (0)
- Block: 1 Offsets: 112 to 127 Dba:0x00000000
- -------------------------------------------------------
- 21202a2f 4c702000 00000000 00000000 l ! */Lp .........
- <16 bytes per line>
- BBED> modify /x d823
- File: /u01/app/oracle/oradata/huateng/htyansp01.dbf (0)
- Block: 1 Offsets: 112 to 127 Dba:0x00000000
- ------------------------------------------------------------------------
- d8232a2f 4c702000 00000000 00000000
- <32 bytes per line>
- BBED> sum apply
- Check value for File 0, Block 1:
- current = 0x39b6, required = 0x39b6
再次使表空间在线,错误就会变为ORA-01113。
- SQL> alter tablespace htyansp online;
- alter tablespace htyansp online
- *
- ERROR at line 1:
- ORA-01113: file 6 needs media recovery
- ORA-01110: data file 6: '/u01/app/oracle/oradata/huateng/htyansp01.dbf'
ORA-01113错误修复就比较简单了,如果没有归档日志的话,也可以通过BBED来修复。
阅读(3240) | 评论(0) | 转发(1) |