Home » SQL & PL/SQL » SQL & PL/SQL » ORA-04068: existing state of packages has been discarded (oracle 9.0.1.0.1)
ORA-04068: existing state of packages has been discarded [message #298265] Tue, 05 February 2008 08:49 Go to next message
jyothsna1217
Messages: 9
Registered: February 2008
Location: hyderabad
Junior Member

hi,
I tried to execute a pl/sql procedure using dbms_pipe package.
But it's compiling,While executing the error is coming..Can u help me/.....
EXAMPLE IS LIKE THIS;

SQL> CREATE OR REPLACE PROCEDURE sendmessage(msg VARCHAR2) AS
2 status_id NUMBER;
3 BEGIN
4 DBMS_PIPE.PACK_MESSAGE(LENGTH(msg));
5 DBMS_PIPE.PACK_MESSAGE(msg);
6 status_id := DBMS_PIPE.SEND_MESSAGE('send_message');
7 IF status_id != 0
8 THEN
9 raise_application_error(-20099, 'send error');
10 END IF;
11 END sendmessage;
12 /

Procedure created.

SQL> exec sendmessage('hello');
BEGIN sendmessage('hello'); END;

*
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SCOTT.DBMS_PIPE" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "SCOTT.SENDMESSAGE", line 4
ORA-06512: at line 1
Re: ORA-04068: existing state of packages has been discarded [message #298269 is a reply to message #298265] Tue, 05 February 2008 08:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Tue, 05 February 2008 15:34
Is not "could not find program unit being called" clear?
I doubt there is a package scott.dbms_pipe.

Next time, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code.
Use the "Preview Message" button to verify.
Always post your Oracle version (4 decimals).


Regards
Michel


Re: ORA-04068: existing state of packages has been discarded [message #298361 is a reply to message #298265] Tue, 05 February 2008 22:43 Go to previous messageGo to next message
jyothsna1217
Messages: 9
Registered: February 2008
Location: hyderabad
Junior Member

I'm sorry,
I'm new to this forum.Next time i'll take care of not repeating such mistakes.Thank you
Re: ORA-04068: existing state of packages has been discarded [message #298366 is a reply to message #298265] Tue, 05 February 2008 23:16 Go to previous messageGo to next message
mshrkshl
Messages: 247
Registered: September 2006
Location: New Delhi
Senior Member
i think you have changed or upgraded your database recently.

so it need either to recompile or it's broken.

You can recompile all stored code in the database by logging in as SYS and running $ORACLE_HOME/rdbms/admin/utlrp.sql.

regards,
Re: ORA-04068: existing state of packages has been discarded [message #298367 is a reply to message #298366] Tue, 05 February 2008 23:17 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
mshrkshl wrote on Wed, 06 February 2008 06:16
i think you have changed or upgraded your database recently.

so it need either to recompile or it's broken.

You can recompile all stored code in the database by logging in as SYS and running $ORACLE_HOME/rdbms/admin/utlrp.sql.

regards,

Read the error. It says "package body "SCOTT.DBMS_PIPE" does not exist"
This has nothing to do with uncompiled program units.
Previous Topic: PL/SQL Problem
Next Topic: Encountered the symbol "end-of-file" when expecting one of the following:
Goto Forum:
  


Current Time: Sun Dec 04 12:40:50 CST 2016

Total time taken to generate the page: 0.07628 seconds