Thursday, February 6, 2014

Undeploying SOA Composite is taking longer time

Issue :- When undeploying a soa composite through Jdeveloper/WLST/EM console, it is taking longer time than usual.

Cause:- Based on the diagnostic log file, undeployment is stuck when it is trying to remove data from MDS during undeployment. 

If you tail the diagnostic log file while un-deployment is in progress, you will see that it get stuck at line containing the string "Removing command lock for". The next step during undeployment after command lock has been removed is removing data from MDS. When checked at Database side, a DELETE SQL query on MDS_COMPONENTS can be seen executing for long time.

Fix:- Execute force gather statistics on MDS Schema.

exec dbms_stats.gather_schema_stats (ownname=>'SOADomain_MDS',estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,block_sample=>FALSE,method_opt=>'FOR ALL COLUMNS SIZE AUTO',granularity=>'ALL',cascade=>true,no_invalidate=>false,options=>'gather') ;