Thursday, January 31, 2013

ORA-04061 : existing state of has been invalidated for Workflow realted packages after modifiction

Whenever we modify the Oracle Workflow related package, the workflow enters into the error Ora-04061: : existing state of has been invalidated workflow. This is quite happens for any workflow,as the packages related to the workflow already loaded into the SGA of the database and which can be cleared most often by restarting the database.But this is not possible for 24 X 7 based databases. 

We can resolve this by the following procedure:

1) Shutdown the Workflow Agent Listeners and Workflow mailer or shutdown the Workflow Generic Service Component Container.
2) Make sure the Package in compiled successfully. 
3) Compile the APPS schema using the adadamin.
4) Bounce the Apache.
5) Restart the Service components and Workflow Mailer service
6) Retry the error workflow.

If the above steps were unable to resolve the issue, then do the additional steps as follows:

 
1) Shutdown the Workflow Agent Listeners and Workflow mailer or shutdown the Workflow Generic Service Component Container.
2) Make sure the Package in compiled successfully. 
3) Compile the APPS schema using the adadamin.
4) connect / as sysdba

SQL>alter system set aq_tm_processes=0 scope=memory;


You need to wait until the q00* and qmnc* processes are no longer running. You can check via

ps -ef | grep q00 and ps -ef | grep qmn


5)  SQL> alter system flush shared_pool;

6) SQL> alter system set aq_tm_processes=1 scope=memory;
 

7) Start the Notification Mailer and agent listeners

8) Retry the error workflow.

No comments: