Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4008454
  • 博文数量: 536
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(536)

文章存档

2024年(3)

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(252)

2006年(73)

分类: Oracle

2011-05-15 12:05:22

[oracle@SXCHNLDB cyclog]$sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Sun May 15 08:17:50 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select count(*) from  TRAIN.TIM_TMP_RPT_KPI_WAIQIN1;
select count(*) from  TRAIN.TIM_TMP_RPT_KPI_WAIQIN1
                            *
ERROR at line 1:
ORA-01410: invalid ROWID


SQL> alter session set max_dump_file_size=unlimited;

Session altered.

SQL> alter session set db_file_multiblock_read_count=1;

Session altered.

SQL> alter session set events '10200 trace name context forever, level 1';

Session altered.

SQL> select count(*) from  TRAIN.TIM_TMP_RPT_KPI_WAIQIN1;
select count(*) from  TRAIN.TIM_TMP_RPT_KPI_WAIQIN1
                            *
ERROR at line 1:
ORA-01410: invalid ROWID


SQL>

[oracle@SXCHNLDB udump]$tail -20 chnldb_ora_3904542.trc
Consistent read started for block 130 : b2003a95
  env: (scn: 0x083c.ef72616d  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: xid: 0x0000.000.00000000  scn: 0x0000.00000000 8sch: scn: 0x0000.00000000)
Consistent read finished for block 130 : b2003a95
Consistent read finished for block 130 : b2003a95
Consistent read started for block 130 : b2003a96
  env: (scn: 0x083c.ef72616d  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: xid: 0x0000.000.00000000  scn: 0x0000.00000000 8sch: scn: 0x0000.00000000)
Consistent read finished for block 130 : b2003a96
Consistent read finished for block 130 : b2003a96
Consistent read started for block 130 : b2003a97
  env: (scn: 0x083c.ef72616d  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: xid: 0x0000.000.00000000  scn: 0x0000.00000000 8sch: scn: 0x0000.00000000)
Consistent read finished for block 130 : b2003a97
Consistent read finished for block 130 : b2003a97
Consistent read started for block 130 : b2003a98
  env: (scn: 0x083c.ef72616d  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: xid: 0x0000.000.00000000  scn: 0x0000.00000000 8sch: scn: 0x0000.00000000)
Consistent read finished for block 130 : b2003a98
Consistent read finished for block 130 : b2003a98
Consistent read started for block 130 : b2003a99
  env: (scn: 0x083c.ef72616d  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: xid: 0x0000.000.00000000  scn: 0x0000.00000000 8sch: scn: 0x0000.00000000)
*** SESSION ID:(2120.533) 2011-05-15 08:23:14.798
OBJD MISMATCH typ=6, seg.obj=5348061, diskobj=6084462, dsflg=100001, dsobj=5348061, tid=5348061, cls=1

---------
SQL> /

DBMS_UTILITY.DATA_BLOCK_ADDRESS_FILE(2986359449) DBMS_UTILITY.DATA_BLOCK_ADDRESS_BLOCK(2986359449)
------------------------------------------------ -------------------------------------------------
                                             712                                             15001

SQL> l
  1* SELECT DBMS_UTILITY.DATA_BLOCK_ADDRESS_FILE(2986359449), DBMS_UTILITY.DATA_BLOCK_ADDRESS_BLOCK(2986359449) FROM DUAL


alter system dump datafile 712 block 15001;


*** 2011-05-15 08:30:00.238
Start dump data blocks tsn: 130 file#: 712 minblk 15001 maxblk 15001
buffer tsn: 130 rdba: 0xb2003a99 (712/15001)
scn: 0x083c.ec5e56bd seq: 0x01 flg: 0x06 tail: 0x56bd0601
frmt: 0x02 chkval: 0x1e7e type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x0000000110444000 to 0x0000000110446000
XXXXXXXXXXXXx
......
Block header dump:  0xb2003a99
 Object id on Block? Y
 seg/obj: 0x5cd76e  csc: 0x83c.ec5e5697  itc: 2  flg: E  typ: 1 - DATA
     brn: 0  bdba: 0xb200240e ver: 0x01 opc: 0
     inc: 0  exflg: 0

 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0038.009.004ce550  0x0300efb7.8f94.14  --U-   34  fsc 0x0000.ec5e56bd
0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000

SQL> SELECT * FROM DBA_OBJECTS WHERE DATA_OBJECT_ID =6084462;

no rows selected
实际对象是不存在的,也就这块错了。但为什么错了呢?目前还不知道为什么。


查查相邻块是否正确:
*** 2011-05-15 08:33:48.051
Start dump data blocks tsn: 130 file#: 712 minblk 15002 maxblk 15002
buffer tsn: 130 rdba: 0xb2003a9a (712/15002)
scn: 0x0839.c41ed70c seq: 0x01 flg: 0x06 tail: 0xd70c0601
frmt: 0x02 chkval: 0xc1ab type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x0000000110444000 to 0x0000000110446000

.........
Block header dump:  0xb2003a9a
 Object id on Block? Y
 seg/obj: 0x519add  csc: 0x839.c41e5c00  itc: 3  flg: E  typ: 1 - DATA
     brn: 0  bdba: 0xb200240e ver: 0x01 opc: 0
     inc: 0  exflg: 0

 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0222.002.0001f599  0x00000000.0000.00  C-U-    0  scn 0x0839.c417b8e5
0x02   0x0207.013.0003cc3a  0x5208dfe2.0ce5.05  C---    0  scn 0x0839.baf002de
0x03   0x000e.001.008b0a39  0x6dc4118d.1a9c.06  --U-   27  fsc 0x1c76.c41ed70c

SQL> SELECT * FROM DBA_OBJECTS WHERE DATA_OBJECT_ID = 5348061;

OWNER
------------------------------------------------------------
OBJECT_NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
SUBOBJECT_NAME                                                OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE                            CREATED
------------------------------------------------------------ ---------- -------------- -------------------------------------- -------------------
LAST_DDL_TIME       TIMESTAMP                              STATUS         TE GE SE
------------------- -------------------------------------- -------------- -- -- --
TRAIN
TIM_TMP_RPT_KPI_WAIQIN1
                                                                4285314        5348061 TABLE                                  2010-03-05 20:18:58
2011-05-11 17:40:51 2010-08-24:18:21:02                    VALID          N  N  N
看来相邻块是对的了。

这里面关键是怎么定位具体是那块数据错了。只有对位了问题然后才可以想办法解决这个问题了。
阅读(1104) | 评论(0) | 转发(0) |
0

上一篇:SQL joins用法

下一篇:Oracle Internals

给主人留下些什么吧!~~