欢迎光临
我们一直在努力

DBMS_REDEFINITION.START_REDEF_TABLE ORA-42008 ORA-22060报错的处理

数据库环境为:rhel6.8 64bit oracle 11.2.0.3.11

凌晨1点起床,执行计划内的数据库操作。将几个大表在线重定义为分区表,以便于空间释放。在执行CAN_REDEF_TABLE是正常,但是在执行START_REDEF_TABLE时报错了,错误信息如下:

ORA-42008: 实例化重新定义时出错

ORA-22060: 参数 [] 是一个无效或未初始化的数值

ORA-06512: 在 "SYS.DBMS_SNAPSHOT_UTL", line 1613

ORA-06512: 在 line 1

ORA-06512: 在 "SYS.DBMS_REDEFINITION", line 56

ORA-06512: 在 "SYS.DBMS_REDEFINITION", line 1490

ORA-06512: 在 line 2

当时第一反应是难道表有问题,以前遇到过表上注释太长导致重定义报错的bug。我换了个表再次执行这些操作,在START_REDEF_TABLE时还是报错了。

没法了,情况紧急,先去百度搜索了一番,又去谷歌搜索了一番,mos也找了,毛都没找到一根,,,单独的ORA-42008,ORA-22060这两个错误多,但是连在一起的时候几乎没有。

不过网上搜索还是有点收获,借鉴了别人的排查错误的方法。有人用10046来跟踪session来发现报错,我也采用试试。

不过情况有变,别人的都是有明确的报错信息,但是在我的10046报告里面没有。。。没办法了,我根据这个报错信息ORA-06512:
在 "SYS.DBMS_SNAPSHOT_UTL", line
1613在10046去查找,找是哪儿执行了DBMS_SNAPSHOT_UTL。最后找到了这个地方sys.dbms_snapshot_utl.get_log_name,我将这个存储过程的参数补全,测试了下,报错就是ORA-22060,到此可以确定是dbms_snapshot_utl的问题了。但是在系统中没有看到任何失效对象,所以在数据库内部的这个包本身是没问题的。

最后的解决方法是经验,这个库以前遇到过dbms_stats运行报错的情况,说一个bug补丁不存在,http://blog.itpub.net/29822273/viewspace-2139924/。当时查过mos,说是因为数据库中的包与实际程序不匹配,比如打补丁后没有运行catbundle
psu
apply。因为这个库是从windows平台迁移至linux平台的,两个平台当时没有完全匹配的小版本,所以只能找了一个与windows版本最接近的linux版本来作为迁移的目标版本。然后升级完了也没运行catbundle
psu apply。

由此想到的办法是重新安装这个包,oracle的安装某些包是有特定步骤的,我怕踩雷,到处搜索了一番,还是没找到重建dbms_snapshot_utl的方法。最后,时间越来越到约定的3点锁表时间了,心一横,直接用grep方法在admin里面去找,发现了两个脚本:

prvtsnap.plb:CREATE OR REPLACE PACKAGE BODY dbms_snapshot_utl wrapped

prvtsnps.plb:CREATE OR REPLACE PACKAGE dbms_snapshot_utl wrapped

一个是package,一个是package body。注意要先运行package脚本,再运行body脚本,否者会报错。

执行完了,在线重定义操作未报错了。

定于凌晨1点执行的在线重定义普通表为分区表的操作,一直延迟到了凌晨3点才正式开始。。。。。。

最后闲下来还是在mos找到了一篇相关文章,之前死活找不到。。。搜索还是一门技艺。。。


Bug 14657634 : DBMS_REDEFINITION.START_REDEF_TABLE ENDS WITH ORA-22060
To Bottom

Bug Attributes


Type

B – Defect

Fixed in Product Version

Severity

2 – Severe Loss of Service

Product Version

11.2.0.3

Status

92 – Closed, Not a Bug

Platform

226 – Linux x86-64

Created

21-Sep-2012

Platform Version

NO DATA

Updated

17-Jan-2018

Base Bug
N/A

Database Version

11.2.0.3

Affects Platforms

Generic

Product Source

Oracle

Knowledge, Patches and Bugs related to this bug

Related Products


Line

Oracle Database Products

Family

Oracle Database Suite

Area

Oracle Database

Product

5 – Oracle Database – Enterprise Edition


Hdr: 14657634 11.2.0.3 RDBMS 11.2.0.3 UNKNOWN PRODID-5 PORTID-226 ORA-22060
Abstract: DBMS_REDEFINITION.START_REDEF_TABLE ENDS WITH ORA-22060
 
----
SAP customer message  729961-2012 TetraPak
 
PROBLEM:
--------
 
BEGIN DBMS_REDEFINITION.START_REDEF_TABLE (UNAME => '"SAPPB3"', ORIG_TABLE => 
'"/BIC/B0001904000"', INT_TABLE => '"/BIC/B0001904000#$"', OPTIONS_FLAG => 
DBMS_REDEFINITION.CONS_USE_PK); END;
 
ORA-42008: error occurred while instantiating the redefinition
ORA-22060: argument [] is an invalid or uninitialized number
ORA-6512: at "SYS.DBMS_SNAPSHOT_UTL", line 1613
ORA-6512: at line 1
ORA-6512: at "SYS.DBMS_REDEFINITION", line 56
ORA-6512: at "SYS.DBMS_REDEFINITION", line 1490
ORA-6512: at line 1
 
this is constantly reproducable at customer system.
 
Table /BIC/B0001904000 holds 545 columns and was compressed by mistake
 
TABLE_NAME                     COMPRESS COMPRESS_FOR
------------------------------ -------- ------------
/BIC/B0001904000               ENABLED  OLTP
 
Using online reorganisation it should be decompressed again.
 
 
 
DIAGNOSTIC ANALYSIS:
--------------------
 
Executing this command directly in SQLPLUS using "/ as sysdba"
It reproduces the error.
 
Created error stack with
alter session set events '22060 trace name errorstack level 4';
 
got the underlying sql wich is failing:
----- Error Stack Dump -----
ORA-22060: argument [] is an invalid or uninitialized number
----- Current SQL Statement for this session (sql_id=4jkx2nsqpz6rt) -----
begin   sys.dbms_snapshot_utl.get_log_name(:master, :mowner, :lognm, :chkpk,  
   :status, :objid);  end;
 
in stack psdexsp() throws the error
 
 
PROCEDURE GET_LOG_NAME
 Argument Name			Type			In/Out Default?
 ------------------------------ ----------------------- ------ --------
 MASTER 			VARCHAR2		IN
 MOWNER 			VARCHAR2		IN
 LOGNM				VARCHAR2		OUT
 CHKFLG 			BINARY_INTEGER		IN
 STATUS 			BINARY_INTEGER		OUT
 MASOBJID			NUMBER			OUT
 
binds given:
 
----- Bind Info (kkscoacd) -----
 Bind#0
  oacdty=01 mxl=32(16) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7caac22  bln=32  avl=16  flg=09
  value="/BIC/B0001904000"
 Bind#1
  oacdty=01 mxl=32(06) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7caac00  bln=32  avl=06  flg=09
  value="SAPPB3"
 Bind#2
  oacdty=01 mxl=32(30) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7caac46  bln=30  avl=00  flg=09
 Bind#3
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7b86db8  bln=22  avl=02  flg=05
  value=36
 Bind#4
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7b86dd0  bln=22  avl=00  flg=01
 Bind#5
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  kxsbbbfp=7faea7b86de8  bln=22  avl=00  flg=01
 
 
Interim table is created like given in ddl.sql
Its the same structure for source table.
 
checking data dictionory by event 10827 and found no error:
 
alter session set events '10827 trace name context forever, level 1'; 
 
SQL> set serverout on
SQL> EXECUTE dbms_registry_sys.validate_components;
 
VPROC: CATALOG DBMS_REGISTRY_SYS.VALIDATE_CATALOG - +000000 
00:00:00.665670000
VPROC: CATPROC DBMS_REGISTRY_SYS.VALIDATE_CATPROC - +000000 
00:00:00.030478000
 
PL/SQL procedure successfully completed.
 
 
even only two objects are invalid, which are owned by SAP user.
One is a VIEW other a SYNONYM.
 
recreating procedure with:
SQL> @?/rdbms/admin/prvtsnap.plb
 
does not fix the error.
 
WORKAROUND:
-----------
use datapump for offline reorganization.
 
RELATED BUGS:
-------------
 
REPRODUCIBILITY:
----------------
 
TEST CASE:
----------
 
STACK TRACE:
------------
skdstdst <- ksedst1 <- ksedst <- dbkedDefDump <- ksedmp
        <- dbkdaKsdActDriver <- dbgdaExecuteAction <- dbgdaRunAction <- 
dbgdRunActions <- dbgdProcessEventAct
         <- ions <- dbgdChkEventKgErr <- dbkdChkEventRdbmsEr <- ksfpec <- 
dbgePostErrorKGE
          <- 1129 <- dbkePostKGE_kgsf <- kgeselv <- ksesecl0 <- psdexsp
           <- rpiswu2 <- psdextp <- pefccal <- pefcal <- pevm_FCAL
            <- pfrinstr_FCAL <- pfrrun_no_tool <- pfrrun <- plsql_run <- 
peicnt
             <- kkxexe <- opiexe <- opiodr <- rpidrus <- skgmstack
              <- rpiswu2 <- rpidrv <- rpiexe <- kkzdgln <- kkzpgcr
               <- kkzpgcinfo <- kkzpcbk <- opikkzprs1 <- opiSem <- opiprs
                <- kksParseChildCursor <- rpiswu2 <- kksLoadChild <- 
kxsGetRuntimeLock <- kksfbc
                 <- kkspsc0 <- kksParseCursor <- opiosq0 <- opiall0 <- opikpr
                  <- opiodr <- rpidrus <- skgmstack <- rpiswu2 <- kprball
                   <- kprbprs <- kkzparse <- kkzvsnqry <- kkzsval <- kkzcsn
                    <- opiexe <- opiosq0 <- opiall0 <- opikpr <- opiodr
                     <- rpidrus <- skgmstack <- rpiswu2 <- kprball <- 
kkzucpmv
                      <- kkzusord <- kkzisord <- spefcmpa <- spefmccallstd <- 
pextproc
                       <- peftrusted <- psdexsp <- rpiswu2 <- psdextp <- 
pefccal
                        <- pefcal <- pevm_FCAL <- pfrinstr_FCAL <- 
pfrrun_no_tool <- pfrrun
                         <- plsql_run <- peicnt <- kkxexe <- opiexe <- kpoal8
                          <- opiodr <- ttcpip <- opitsk <- opiino <- opiodr
                           <- opidrv <- sou2o <- opimai_real <- ssthrdmain <- 
main
                            <- libc_start_main <- start
 
SUPPORTING INFORMATION:
-----------------------
files uploaded:
ddl.sql - for intermim table
SB3_ora_16396.zip  - errorstack trace
 
24 HOUR CONTACT INFORMATION FOR P1 BUGS:
----------------------------------------
 
DIAL-IN INFORMATION:
--------------------
 
IMPACT DATE:
------------
 
patches currently inistalled:
 SAP Bundle Patch 11.2.0.3.2 - 201205
 
-> this is RDBMS PSU#2
see file opatch_lsinventory.zip for complete patch list
see dba_registry_history.zip for update history
 
============================================
 
Key Symptoms/Summary/Rediscovery:
  Errors from DBMS_REDEFINITION.START_REDEF_TABLE:
   ORA-42008: error occurred while instantiating the redefinition
   ORA-22060: argument [] is an invalid or uninitialized number
 
Explain why this is not a bug:
  Patch 13767921 was not applied properly - the package was
  in the DB but the oracle executable was not relinked for
  some unknown reason. Hence there was a mismatched part 
  installed patch.
=============================================

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。