Solved

ORA-04088: error during execution of trigger ORA-06508: PL/SQL: could not find program unit being called

Posted on 2012-03-20
2
1,222 Views
Last Modified: 2012-06-27
I have a trigger created in one schema that in used on a table in another schema.

The trigger calls a procedure from a package , this package is defined as current user authid

I get the error when teh trigger reaches the point at which the function call is to be made.

but I dont knwo how to get around that problem... has any got any clues ??

create or replace
TRIGGER TEG.TR_AEC_COMPLETE_TASK_95
 AFTER
  UPDATE
 ON WMIS.wr_task
REFERENCING NEW AS NEW OLD AS OLD
 FOR EACH ROW
WHEN (NEW.wr_task_no = 100 AND
      NEW.task_status_code = 'C' AND
      OLD.task_status_code != 'C')
Declare
....
...
BEgin
..
..
-- follwoing two procs added to trigger
TEG.SPCKG_AEC_MSG_LOG.Application_Log_TEST  -- this call ok

TEG.SPCKG_AEC_BL_TSK_95_CMPLT.RESOLVE_SCHDLNG_PLYGN_5047 -- this is where oracle fails with teh error

..
exception
..
..
end;

this code works fine if i remove teh offending RESOLVE_SCHDLNG_PLYGN_5047 , but i need to add that proc to reslove an issue

this is the error i get

ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "TEG.TR_AEC_COMPLETE_TASK_95", line 294
ORA-04088: error during execution of trigger "TEG.TR_AEC_COMPLETE_TASK_95"       

I am thinking is some dort of prvilidges issue .. any clues ...
0
Comment
Question by:jhacharya
2 Comments
 
LVL 20

Accepted Solution

by:
flow01 earned 500 total points
ID: 37745204
what user is updating table WMIS.wr_task

is the
TEG.SPCKG_AEC_BL_TSK_95_CMPLT.RESOLVE_SCHDLNG_PLYGN_5047 granted to that user ?

is the
TEG.SPCKG_AEC_BL_TSK_95_CMPLT.RESOLVE_SCHDLNG_PLYGN_5047 granted directly to that user :
by directly i mean
there is a "grant execute to user xxx on  TEG.SPCKG_AEC_BL_TSK_95_CMPLT.RESOLVE_SCHDLNG_PLYGN_5047"

and  not only a grant execute to a role the user has

for use within packages i did need such  direct grants , may same goes for triggers

PS (probably nothing to do with your problem)
i would expect a trigger on a WMIS-table to be owned by WMIS, I didn't even know another schema could own a trigger on a table in a different schema
0
 
LVL 2

Author Closing Comment

by:jhacharya
ID: 37745594
.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now