Home » SQL & PL/SQL » SQL & PL/SQL » Trigger - Not able to find the program unit being called
Trigger - Not able to find the program unit being called [message #384450] Tue, 03 February 2009 21:07 Go to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
Hi ALL,

SQL> SELECT banner FROM v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production


I have a custom trigger((After Insert/Update) on Oracle Apps standard table). This trigger inturn calls a custom package.

The problem is, some times this trigger completes with the following error message. This is not happening consitently.

"ORA-06508: PL/SQL: could not find program unit being called"

I am inserting the debug messages(from trigger) into a custom table. I could able to see the messages till we call the custom package, then it goes to trigger exception block with the above error message.

I am getting dependancy objects status from all_objects and inserting into the custom table just before call the package. All the object status are in "VALID". But still
I am getting the above error message.

Could any body throw some light to fix this issue ?

Regards,
Prabhu
Re: Trigger - Not able to find the program unit being called [message #384456 is a reply to message #384450] Tue, 03 February 2009 23:10 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
This issue is realated to permission given the Unit being called in the trigger, Grant Execute privilege to the your custom package.
Re: Trigger - Not able to find the program unit being called [message #384479 is a reply to message #384450] Wed, 04 February 2009 00:39 Go to previous messageGo to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
Trigger and custom package are in same schema.
There is no need to give grant access to the package.
Re: Trigger - Not able to find the program unit being called [message #384484 is a reply to message #384450] Wed, 04 February 2009 01:09 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
Based upon the information you provided us, the only applicable answer to this moment is:

Quote:

ORA-06508: PL/SQL: could not find program unit being called

Cause: An attempt was made to call a stored program that could not be found. The program may have been dropped or incompatibly modified, or have compiled with errors.

Action: Check that all referenced programs, including their package bodies, exist and are compatible.



Maybe if you could provide us with the code of the trigger and the package other answers could arise Wink

Re: Trigger - Not able to find the program unit being called [message #384665 is a reply to message #384450] Wed, 04 February 2009 13:07 Go to previous messageGo to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
I have attached three files..

1. trigger code
2. package spec and body
3. custom table records (debug messages inserted thru trigger)

Thanks in advance..

Regards,
Prabhu
Re: Trigger - Not able to find the program unit being called [message #384666 is a reply to message #384450] Wed, 04 February 2009 13:18 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>I have attached three files..
Where?

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you & please be consistent & correct in your postings.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.
Re: Trigger - Not able to find the program unit being called [message #384667 is a reply to message #384450] Wed, 04 February 2009 13:40 Go to previous messageGo to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
I have attached the files in the "Post Reply" -> "File Attachements" section.

Per guide lines, I have to format the code and paste it here..

But the package code has 3100 lines. That is the reason I have used the above option to upload the files.

Shall I format and paste all the code here ?

Thanks.

Re: Trigger - Not able to find the program unit being called [message #384741 is a reply to message #384450] Thu, 05 February 2009 00:34 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
Over to the old-fashioned step-by-step method Smile

For starters: have a quick read at the Forum Guidelines, especially the topic on "How to format your post".

Then post the trigger code, so maybe we can narrow down in the package code.
I don't think anybody is interested or willing to read 3.100 lines of code

[Updated on: Thu, 05 February 2009 00:35]

Report message to a moderator

Re: Trigger - Not able to find the program unit being called [message #384783 is a reply to message #384667] Thu, 05 February 2009 03:14 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
I have attached the files in the "Post Reply" -> "File Attachements" section.


Well, it didn't work.

Can you post the trigger code, the exact error that you get, and the package header - no need for the body if it's 3000 lines long.
Re: Trigger - Not able to find the program unit being called [message #385464 is a reply to message #384450] Mon, 09 February 2009 17:04 Go to previous message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
Sorry for the tardy response.

The issue is resolved. Some of the dependancy object seems to be become invalid after I execute the package.

Thanks for your inputs.
Previous Topic: ORA-29279 553 error
Next Topic: Illustrate a many to many relationship (merged 3)
Goto Forum:
  


Current Time: Sat Dec 10 13:07:54 CST 2016

Total time taken to generate the page: 0.04049 seconds