Be Warned: cmclean.sql Is Dangerous!
- Concurrent manager process (e.g. FNDLIBR in case of Standard Manager) queries the FND_CONCURRENT_REQUESTS table for pending requests.
- When a pending request is found, the manager process updates the PHASE_CODE=R (Running) and STATUS_CODE=R (Running).
- The next step is to start the executable of the concurrent program. If it’s a PL/SQL procedure – FNDLIBR connects to the DB and executes the PL/SQL code, if it’s a java program – FNDLIBR starts up a java process to execute the java class, etc.
- FNDLIBR catches the exit codes from the executable of the concurrent program and updates the statuses in FND_CONCURRENT_REQUESTS accordingly - PHASE_CODE=C (Completed) and STATUS_CODE = C (Normal), G (Warning) or E (Error).
- FNDLIBR checks if the concurrent request has a schedule and needs to be resubmitted. If yes – it resubmits a new concurrent request with the same parameters.
"Concurrent Manager Recovery" wizard is even worse! (Added on Jul 21, 2013)
After posting this article I started thinking about whether the "Concurrent Manager Recovery" Wizard available from Oracle Applications Manager in e-Business Suite was any better then cmclean.sql or not. As I didn't have much experience with it I decided to give it a try. This is what I did:- I scheduled 2 concurrent programs ("CP Java Regression Test" and "CP PLSQL Regression Test") to restart in 1 minute after the previous execution completes. These are simple test concurrent programs which sleep for some time and then complete.
- I made sure both programs were running and terminated all concurrent manager process and DB sessions for these concurrent programs.
- The termination of the processes and sessions left the rows in FND_CONCURRENT_REQUESTS with PHASE_CODE=R and STATUS_CODE=R
- I executed the "Concurrent Manager Recovery" wizard which fixed the status codes of the concurrent manager processes, but didn't touch the statuses of the concurrent requests - I thought this was a good thing (I expected the ICM to clean up the statuses and resubmit the requests at its startup phase)
- I started up the concurrent managers, but ICM didn't clean up the 2 stale records in FND_CONCURRENT_REQUESTS table. The 2 requests appeared as they would be running, while in fact they didn't have any OS processes or DB sessions.
So what should we do to clean up the concurrent processing tables after crashes or cloning? (Added on Jul 21, 2013)
It appears to me that no reliable way exists to clean up the tables properly. The cmclean.sql can remove some schedules without warning. The "Concurrent Manager Recovery" wizard may leave some requests in the running state even if they were terminated. I'm going to open a SR for Oracle to request a proper solution, but meanwhile I'd suggest to use the cmclean.sql. However, make sure to check its outputs carefully and reschedule any requests which got cleaned up (as described above).P.S. The description of the behavior of ICM in this blog post is a result of investigation performed on R12.1.3. I believe it behaves the same way in R12.1 and probably even in R12.0 and 11i, but I didn’t check. MOS Article ID 134007.1 which contains the cmclean.sql script is valid for Applications versions 10.7 to 12.1.3 – be careful when using it independently from the version of your e-Business Suite installation.
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
PART 4: Implementing Oracle Database Single Sign-on Using Kerberos, Active Directory, and Oracle CMU

PART 4: Implementing Oracle Database Single Sign-on Using Kerberos, Active Directory, and Oracle CMU
Feb 24, 2020 10:06:00 AM
17
min read
Mining the AWR to Identify Performance Trends
Mining the AWR to Identify Performance Trends
Oct 31, 2013 12:00:00 AM
8
min read
Pro-active AWR Data Mining to find change in SQL Execution Plan
Pro-active AWR Data Mining to find change in SQL Execution Plan
Jul 7, 2014 12:00:00 AM
2
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.