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,248 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup

786 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