EBS concurrency manager table CMCLEAN. SQL, ebs concurrent cmclean. SQL
Concurrent Processing-CMCLEAN. SQL-Non Destructive Script to Clean Concurrent Manager Tables [ID 134007.1] |
|
|
Modification time14-AUG-2011TypeSCRIPTStatusPUBLISHED |
|
Applies to: Oracle Application Object Library-Version: 10.7 to 12.0-Release: 10.7
Oracle Concurrent Processing-Version: 11.5.10.0 to 12.1.3 [Release: 11.5 to 12.1]
Information in this document applies to any platform.
Checked for relevance on 23-APR-2011
Applications Install 10.7 to 12.1.3PurposeThis document provides a reference to self service Cleaning the Concurrent Manager tables
Non Destructive Script to Clean Concurrent Manager Tables
NOTE:
This script works with 10.7, 11.0, 11.5 & 12.1.3 Applications.
Information Center, Diagnostics, & Community
Software Requirements/PrerequisitesSQLplusConfiguring the ScriptCopy from the first REM statement to the last REM statement of this document and save as: cmclean. SQL.
NOTE:
Ensure that No FNDLIBR processes are running as detailed within the Troubleshooting Note 104541.1 and that the Concurrent Manager is down.
Issue a commit once the script is run for the changes to take effect.
Running the ScriptPlease run the Concurrent Manager Recovery feature to address any Concurrent Manager/Concurrent Processing issues within the Oracle Application Manager.
Using the Concurrent Manager Recovery wizard is the method to clear the errors upon bringing the internal manager back up.
The cmclean script can still be used for Application instances provided the managers are down and no FNDLIBR processes are still running.
For Concurrent Internal Manager failures, it is recommended to run the Concurrent Manager Recovery feature using the Oracle Applications Manager. this feature shocould be used for recovering from when the Internal Manager won't start. this is accessed from the Troubleshooting wizards available within applications logged in as the sysadmin userid.
Navigate:
Oracle Applications Manager> Concurrent Managers OR Concurrent Requests> Site Map> Diagnostics
And Repair> Concurrent Manager Recovery
For information on the Concurrent Manager Recovery feature, please reference the Oracle Applications System Administrator's Guide-Maintenance provides information for frequent tasks such as monitoring your system with Oracle Applications Manager, administering Oracle E-Business Suite Secure Enterprise. search, managing concurrent managers and reports, using diagnostic utilities including logging, managing profile options, and using alerts.
To run cmclean. SQL:
Usage: sqlplus @ cmclean
Caution
This script is provided for educational purposes only and not supported by Oracle Support Services. it has been tested internally, however, and works as incluented. we do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.
Proofread this script before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns ), this script may not be in an executable state when you first receive it. check over the script to ensure that errors of this type are corrected.
Script
REMREM FILENAMEREM cmclean.sqlREM DESCRIPTIONREM Clean out the concurrent manager tablesREM NOTESREM Usage: sqlplus @cmclean REM REMREM $Id: cmclean.sql,v 1.4 2001/04/07 15:55:07 pferguso Exp $REM REMREM +======================================================================+set verify off;set head off;set timing offset pagesize 1000column manager format a20 heading 'Manager short name'column pid heading 'Process id'column pscode format a12 heading 'Status code'column ccode format a12 heading 'Control code'column request heading 'Request ID'column pcode format a6 heading 'Phase'column scode format a6 heading 'Status'WHENEVER SQLERROR EXIT ROLLBACK;DOCUMENTWARNING : Do not run this script without explicit instructionsfrom Oracle Support *** Make sure that the managers are shut down *** *** before running this script ****** If the concurrent managers are NOT shut down, ****** exit this script now !! ***#accept answer prompt 'If you wish to continue type the word ''dual'': 'set feed offselect null from &answer;set feed onREM Update process status codes to TERMINATEDpromptprompt ------------------------------------------------------------------------prompt -- Updating invalid process status codes in FND_CONCURRENT_PROCESSESset feedback offset head onbreak on managerSELECT concurrent_queue_name manager, concurrent_process_id pid,process_status_code pscodeFROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcpWHERE process_status_code not in ('K', 'S')AND fcq.concurrent_queue_id = fcp.concurrent_queue_idAND fcq.application_id = fcp.queue_application_id;set head offset feedback onUPDATE fnd_concurrent_processesSET process_status_code = 'K'WHERE process_status_code not in ('K', 'S');REM Set all managers to 0 processes promptprompt ------------------------------------------------------------------------prompt -- Updating running processes in FND_CONCURRENT_QUEUESprompt -- Setting running_processes = 0 and max_processes = 0 for all managersUPDATE fnd_concurrent_queuesSET running_processes = 0, max_processes = 0;REM Reset control codespromptprompt ------------------------------------------------------------------------prompt -- Updating invalid control_codes in FND_CONCURRENT_QUEUESset feedback offset head onSELECT concurrent_queue_name manager,control_code ccodeFROM fnd_concurrent_queuesWHERE control_code not in ('E', 'R', 'X')AND control_code IS NOT NULL;set feedback onset head offUPDATE fnd_concurrent_queuesSET control_code = NULLWHERE control_code not in ('E', 'R', 'X')AND control_code IS NOT NULL;REM Also null out target_node for all managersUPDATE fnd_concurrent_queuesSET target_node = null;REM Set all 'Terminating' requests to Completed/ErrorREM Also set Running requests to completed, since the managers are downpromptprompt ------------------------------------------------------------------------prompt -- Updating any Running or Terminating requests to Completed/Errorset feedback offset head onSELECT request_id request,phase_code pcode,status_code scodeFROM fnd_concurrent_requestsWHERE status_code = 'T' OR phase_code = 'R'ORDER BY request_id;set feedback onset head offUPDATE fnd_concurrent_requestsSET phase_code = 'C', status_code = 'E'WHERE status_code ='T' OR phase_code = 'R';REM Set all Runalone flags to 'N'REM This has to be done differently for Release 10promptprompt ------------------------------------------------------------------------prompt -- Updating any Runalone flags to 'N'promptset serveroutput onset feedback offdeclarec pls_integer := dbms_sql.open_cursor;upd_rows pls_integer;vers varchar2(50);tbl varchar2(50);col varchar2(50);statement varchar2(255);beginselect substr(release_name, 1, 2)into versfrom fnd_product_groups;if vers >= 11 thentbl := 'fnd_conflicts_domain';col := 'runalone_flag';elsetbl := 'fnd_concurrent_conflict_sets';col := 'run_alone_flag';end if;statement := 'update ' || tbl || ' set ' || col || '=''N'' where ' || col || ' = ''Y''';dbms_sql.parse(c, statement, dbms_sql.native);upd_rows := dbms_sql.execute(c);dbms_sql.close_cursor(c);dbms_output.put_line('Updated ' || upd_rows || ' rows of ' || col || ' in ' || tbl || ' to ''N''');end;/prompt prompt ------------------------------------------------------------------------prompt Updates complete.prompt Type commit now to commit these updates, or rollback to cancel.prompt ------------------------------------------------------------------------promptset feedback onREM <= Last REM statment -----------------------------------------------------
Disclause
Could t where expressly provided otherwise, the information, SOFTWARE,
Provided on an "as is" AND "as available" BASIS. ORACLE EXPRESSLY DISCLAIMS
All warranties of any kind, whether express or implied, INCLUDING, BUT NOT
Limited to, the implied warranties of merchantability, fitness for a participant
Purpose and NON-INFRINGEMENT. oracle makes no warranty that: (A) THE RESULTS
THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR
RELIABLE; OR (B) THE INFORMATION, OR OTHER MATERIAL OBTAINED WILL MEET YOUR
EXPECTATIONS. any content, MATERIALS, INFORMATION OR SOFTWARE DOWNLOADED OR
Otherwise obtained is done at your own discretion and risk. ORACLE SHALL HAVE
NO RESPONSIBILITY FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT
Results from the download of any content, MATERIALS, information or software.
ORACLE RESERVES THE RIGHT TO MAKE CHANGES OR UPDATES TO THE SOFTWARE AT ANY
Time without notice.
Limitation of Liability
In no event shall oracle be liable for any direct, INDIRECT, INCIDENTAL,
Special or consequential damages, or damages for loss of profits, REVENUE,
Data or use, incurred by you or any third party, WHETHER IN AN ACTION IN
Contract or tort, arising from your access to, or use of, the software.
Some jurisdictions do not allow the limitation or exclusion of liability.
ACCORDINGLY, some of the above limitations may not apply to you.