The procedure shown above requires quite the manual effort. I've seen customers that had 5-10 "stages" in which the various concurrent managers had to be stopped. Unfortunately, by using some "semi-documented" APIs, it's possible to stop (and later start) these concurrent managers through scripts.
I've implemented this with the following bash helper function:
function stopManager {
stop_initiated=0
for (( ; ; ))
do
res=`sqlplus -s apps/$XX_APPS_PWD << EOF
set pages 0
set head off
set feed off
SELECT
running_processes
FROM
fnd_concurrent_queues
WHERE
concurrent_queue_name ='$2'
;
EXIT;
EOF`
echo running processes for $2 is: $res
if [ "$res" -eq "0" ]; then
break
fi
if [ "$stop_initiated" -eq "0" ]; then
CONCSUB apps/$XX_APPS_PWD SYSADMIN 'System Administrator' SYSADMIN CONCURRENT FND DEACTIVATE $1 $2
stop_initiated=1
fi
sleep 5
done
}
The function runs in a loop and has the following core components:
The function is called with the Application Short Name and the name of the manager to stop.
By using this helper function, you can then have a main script as follows:
source /home/oracle/credsEnv.sh
source /u01/install/APPS/EBSapps.env run;
stopManager XXIS XX_RESTART_NP_MANAGER
stopManager FND XX_NP_MANAGER
#next in parallel:
stopManager FND XX_NP_MANAGER_1 &
stopManager FND XX_NP_MANAGER_2 &
stopManager FND XX_NP_MANAGER_3 &
wait
stopManager FND XX_MMP_MANAGER
This process first stops XX_RESTART_NP_MANAGER, after this is completed, it stops XX_NP_MANAGER.
Then, XX_NP_MANAGER_1, XX_NP_MANAGER_2 and XX_NP_MANAGER_3 are stopped in parallel (to save time).
Finally, we stop XX_MMP_MANAGER.