Today, I tried to remove a plugin from Management Server but I see that undeployment process was hung at step 5:
----------------------------- ----------------------- ------------------------- Step Start Time End Time ----------------------------- ----------------------- ------------------------- Submit job for undeployment 6/26/15 8:39:07 AM EEST 6/26/15 8:39:07 AM EEST Success Initialize 6/26/15 8:39:23 AM EEST 6/26/15 8:39:24 AM EEST Success Validate plug-in home 6/26/15 8:39:25 AM EEST 6/26/15 8:39:27 AM EEST Success Delete plug-in's metadata 6/26/15 8:39:28 AM EEST 6/26/15 8:39:49 AM EEST Success Deconfigure plug-in from Management Repository 6/26/15 8:39:50 AM EEST N/A Running ----------------------------- ----------------------- -------------------------
I connected to Management Repository and see if there’s any waiting process. Unfortunately there was nothing. So I started to examine “active” processes of SYS user. You may know that EM12c uses SYS user when deploying or undeploying agent software. I found a process working for minutes, trying to complete the following commmand:
BEGIN SYSMAN.emd_maintenance.disable_em_dbms_jobs(); END;
It’s easy to guess that it’s related with disabling the scheduler jobs belong to Enterprise Manager but I wanted to be sure and check the package code. As expected, the procedure queries the scheduler jobs of the repository owner (SYSMAN) and then disable all its jobs but it hung. After a quick check on My Oracle Support, I couldn’t find any solution for emd_maintenance.disable_em_dbms_jobs so I decided to let him help by restarting the cjq0 process. I queried the job_queue_processes, set it to zero, and then reset it to its previous value.
SQL> show parameter job NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ job_queue_processes integer 1000 SQL> alter system set job_queue_processes=0; System altered. SQL> alter system set job_queue_processes=1000; System altered.
And then I see that undeployment process continued without any problem.