ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA600 [qcsgpvc3]

ORA600 [qcsgpvc3]

原创 Linux操作系统 作者:sanxiagirl 时间:2010-04-21 17:48:01 0 删除 编辑

一个procedure创建时出错,ERROR信息为ORA600 [qcsgpvc3],出错部分为:

      INSERT INTO sfism4.wip_d_smt_alarm
                  (machine_code, product_no, ver, emp_no, feeder_no,
                   key_part_no, line_name, alarm_flag
                  )
           VALUES (machine, ppn, ver, emp, loc,
                   v_kpn, line, 'Y');

查找metalink发现,是10.2.0.4的一个BUG,变量名ver与列名ver相同。

以下来源于metalink。

Bug 7172752  OERI[qcsgpvc3] recompiling a package body

 This note gives a brief overview of bug 7172752.
 The content was last updated on: 20-OCT-2009
 Click here for details of each of the sections below.

Affects:

Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions < 11.2
Versions confirmed as being affected
Platforms affected Generic (all / most platforms affected)

Fixed:

This issue is fixed in

Symptoms:

Related To:

Description

An ORA-600 can occur while recompiling stored PLSQL 
if a procedure / function argument name matches to a column
name referred to in that function / procedure .

eg:
 create table t( c1 varchar2(60),c2 number);
 create or replace package p is
 procedure po(c1 varchar2,c2 number);
 end p;
 /
 Prompt create a procedure so it raises ora-904 (wrong col name)
 create or replace package body p is
   procedure po(c1 varchar2,c2 number)
   is
   begin
     insert into t(c1,i_bad -- wrong column name
     ) 
     values(c1,c2);
   end po;
 end p;
 /
 create or replace package body p is
   procedure po(c1 varchar2,c2 number)
   is
   begin
     insert into t(c1,c2) values (c1,c2);
   end po;
 end p;
 /
 alter table t rename column c2 to i_problem;
 alter package p compile body;
 ^
 ORA-600

Workaround
  Change the Function/procedure's argument name so that it does not
  match to any column name being referred in the function/procedure body.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10640532/viewspace-660361/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-02

  • 博文量
    142
  • 访问量
    550715