Home » SQL & PL/SQL » SQL & PL/SQL » Pl Sql - Error (oracle 9i)
Pl Sql - Error [message #357003] Mon, 03 November 2008 08:30 Go to next message
sivaram2006
Messages: 7
Registered: October 2008
Location: chennai
Junior Member
Hi all,

While calling a function from another main function, I m getting this error..

ORA-04068: existing state of packages has been discarded
ORA-04064: not executed, invalidated function "IS_SAP.FN_DYNAMICREPORT_PRIVATE"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "IS_SAP.SPR_DYNAMICREPORT_PARAM_IS1", line 4752
ORA-06512: at line 2

--------------------------
SPR_DYNAMICREPORT_PARAM_IS1 is the calling procedure

FN_DYNAMICREPORT_PRIVATE is the called procedure..

Both the procedures are valid and compliling..

When I try to execute the Sub Procedure Alone, its working fine..

Need some suggestion on this..


Thanks...
Re: Pl Sql - Error [message #357005 is a reply to message #357003] Mon, 03 November 2008 08:42 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Retry.
The packaga has been modified since your last call and need to be reinitialized.

Regards
Michel
Re: Pl Sql - Error [message #357007 is a reply to message #357005] Mon, 03 November 2008 08:49 Go to previous messageGo to next message
sivaram2006
Messages: 7
Registered: October 2008
Location: chennai
Junior Member
Hi..

Thanks for the reply..

I tried restaring the database also. Still I get this error. What can I do in this case. Is there any error in Code..?

Thanks..
Re: Pl Sql - Error [message #357033 is a reply to message #357007] Mon, 03 November 2008 11:14 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What about
Quote:
could not find program unit being called
Re: Pl Sql - Error [message #357069 is a reply to message #357003] Mon, 03 November 2008 14:45 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Just to be sure: do you re-create any database objects in that calling procedure (SPR_DYNAMICREPORT_PARAM_IS1)? Especially the ones, returned by this query:
SELECT referenced_name
FROM user_dependencies
WHERE name = 'IS_SAP';
Re: Pl Sql - Error [message #357099 is a reply to message #357069] Mon, 03 November 2008 22:51 Go to previous messageGo to next message
sivaram2006
Messages: 7
Registered: October 2008
Location: chennai
Junior Member
Hi..

Thanks for your reply..

I am sorry.. I didnt understand the meaning of that query.. But when I execute that it says "no rows selected"..

Can u explain that still..

Thanks..

Re: Pl Sql - Error [message #357105 is a reply to message #357003] Mon, 03 November 2008 23:28 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Quote:
I didnt understand the meaning of that query..

It shows, which objects (tables, types, procedures, ...) are statically used in (= dependent on) given procedure/function/package. Whenever you would make any change on them (e.g. drop and create a table, add a column into type, ...), the depending procedure/function/package would be re-compiled, and so the error you mentioned would be raised.
Quote:
But when I execute that it says "no rows selected"..

As I am used to use packages everywhere, so I (wrongly) expected that IS_SAP is the name of the package containing functions. If it is only the name of the user and you use standalone functions/procedures, simply replace IS_SAP with the name of the procedure/function (SPR_DYNAMICREPORT_PARAM_IS1). But you still have to check the calling procedure code for any DDL (especially on the returned objects).
Previous Topic: how to write this query
Next Topic: How do I know if I can truncate a table?
Goto Forum:
  


Current Time: Mon Dec 05 15:11:24 CST 2016

Total time taken to generate the page: 0.04931 seconds