出产报表数据库呈现了运动事项的回滚段毁坏(二)

本源:网海拾贝




目前入部下手想办法处理处分这个运动事项和含有运动事项的回滚段了。

 

首先准备drop这个表试试看(先备份,然后drop,然后重建):

先是运用CTAS备份这个表:

SQL> create table WAP_AUTHPRICE_USER_SP_RD060308 tablespace INDEX_SUBN01 nologging as
select * from WAP_AUTHPRICE_USER_SP_RD where 1=2;
  2 
Table created.

SQL> insert into WAP_AUTHPRICE_USER_SP_RD060308 nologging
  2  select * from WAP_AUTHPRICE_USER_SP_RD;
insert into WAP_AUTHPRICE_USER_SP_RD060308 nologging
*
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number 19 with name "_SYSSMU19 $"
too small


SQL> insert into WAP_AUTHPRICE_USER_SP_RD060308 nologging
  2  select * from WAP_AUTHPRICE_USER_SP_RD where rownum<100;

99 rows created.

SQL> rollback;

Rollback complete.

SQL>

我们看到,每次扫表到谁人回滚段中的数据库时,系统就会报ORA-01555了。

由此料到,一切的对表的FTS城市丧失败,比方exp:

oracle@rdb01:/oracle > exp report/slienttop parfile=a.par

Export: Release 9.2.0.5.0 - Production on Thu Mar 9 14:31:45 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning and OLAP options
JServer Release 9.2.0.5.0 - Production
Export done in ZHS16GBK character set and UTF8 NCHAR character set

About to export specified tables via Direct Path ...
. . exporting table       WAP_AUTHPRICE_USER_SP_RD
EXP-00056: ORACLE error 942 encountered
ORA-00942: table or view does not exist
Export terminated successfully with warnings.
oracle@rdb01:/oracle >

 

目前,只需运用DUL了:

DUL> unload report.WAP_AUTHPRICE_USER_SP_RD;
. unloading table  WAP_AUTHPRICE_USER_SP_RD
 9430056 rows unloaded
DUL> exit

oracle@rdb01:/data/tmp/dul > gzip REPORT_WAP_AUTHPRICE_USER_SP_RD.dmp
oracle@rdb01:/data/tmp/dul > ll REPORT_WAP_AUTHPRICE_USER_SP_RD.dm*
-rw-r--r--   1 oracle     dba        49514464 Mar 13 14:18 REPORT_WAP_AUTHPRICE_USER_SP_RD.dmp.gz
oracle@rdb01:/data/tmp/dul >

这时,忽然想到运用oracledebug来跟踪一下历程大要会话,大要会有点收成:

SQL> oradebug setospid 15664 
ORA-00072: process "Unix process pid: 15664, image: " is not active
SQL> oradebug setospid 15664 
ORA-00072: process "Unix process pid: 15664, image: " is not active
SQL>

SQL> select pid, spid, username from v $process where spid=15664; 

       PID SPID         USERNAME
---------- ------------ ---------------
        63 15664        oracle

SQL>
SQL> oradebug setorapid 63 
ORA-00072: process "Unix process pid: 15664, image: oracle@rdb01 (TNS V1-V3)" is not active
SQL>

显然,这个成果是和我们适才在操纵系统上kill process,以及在数据库中kill session的成果是一致的——我们不能找到这些process和session的活动了。

由于alert.log的内容曾经被人清空了,但是数据库中可以看到:

       USN NAME       STATUS          TABLESPACE_NAME      ADDR                SID SERIAL# USERNAME   PROGRAM              MACHINE    OSUSER
---------- ---------- --------------- -------------------- ---------------- ------ ------- ---------- -------------------- ---------- ----------
        19 _SYSSMU19 $ PENDING OFFLINE UNDOTBS1             C0000001A7BF5218     71   39809 REPORT     sqlldr@RPT01 (TNS CS_RPT01   report16

这个回滚段曾经毁坏,而且运动事项是一个sqlloader的历程(适才看到的数据库中sid 71正在执行的sql语句恰恰也是多么一个insert语句)。由此证实了我最后的推想。由于某种启事,开辟人员将正在执行的sqlloader历程kill了,而此时恰恰有一交运动在回滚段中,这个事故孕育发作在12/30/05 01:48:33 当前,由于没有及时的缔造和处理处分这个成绩,数据库的日记曾经被笼盖多次,再之后,就孕育发作了我们目前看到的情况。

当然alert.log的内容不在了,但是凭据事故孕育发作的时分,我们找到了呼应的trace--report_ora_15664.trc,内里有如下的内容:

奸通奸骗 SESSION ID:(71.25999) 2005-12-30 01:48:33.580
奸通奸骗 2005-12-30 01:48:33.580
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [4193], [2987], [2984], [], [], [], [], []
Current SQL statement for this session:
INSERT INTO WAP_AUTHPRICE_USER_SP_RD   (LOCATIONID,ICPID,SUBSCAT,ICPATTR,ICPCODE,COUNTS,PERIOD,STAT_TIME) VALUES (:LOCATIONID,:ICPID,:SUBSCAT,:ICPATTR,:ICPCODE,:COUNTS,:PERIOD,TO_DATE(:STAT_TIME,'yyyy-mm-dd hh24:mi:ss'))

ORA-00600 [4193],这类错误粗浅即是运动回滚段毁坏一类的错误了,详细的可以审查metalink。

目前我曾经制订了一套执行方案,下周一入部下手处理处分这个成绩(由于24*7,这类有风险的操纵必须求写报告报到公司的率领和客户的率领,层层审批,呵呵)。。。




版权声明: 原创作品,允许转载,转载时请务必以超链接情势标明文章 原始出处 、作者信息和本声明。否则将追查法令责任。

原文地址:https://www.cnblogs.com/zgqjymx/p/1976329.html