Friday, January 18, 2008

Concurrent Manager:
---------------------
A mechanism that runs concurrent programs.
A manager operates duringthe time and days defined by a work shift. A manager can run any concurrent program, or be specialized to run anyconcurrent program, or be specialized to run only certain kinds of programs.

Concurrent Program:
---------------------
A program that runs concurrently (at the same time) as other programs.
Concurrentprograms run as background processes, while you continue to work at your terminal.”A concurrent program is an instance of an execution file, along with parameter definitions and incompatibilities.

Concurrent programs use concurrent program executables to locate the correct execution file.
Several concurrent programs may use the same execution file to perform their specific tasks, each having different parameter defaults and incompatibilities.

Concurrent Program Executable
---------------------------------
A concurrent program executable links an execution file or and the method used to execute it with a defined concurrent program.

Under Concurrent Processing, an execution method may be a program written in a standard language, a reporting tool, or an operating system language.

An execution method can be :

1. A PL/SQL Stored Procedure,
2. An Oracle Tool such as Oracle Reports or SQL*Plus, a spawned process, or
3. An operating system host language (eg . Shell or DCL).

Concurrent Program Execution File
=========================

A concurrent program execution file is an operating system file or database stored procedure which contains your application logic and can be executed by either invoking it directly on the command line or by invoking a program which acts upon it.

For example, you run a Pro*C program by invoking it on the command line. You run a SQL script by running SQL*Plus and passing the name of the SQL script without the .sql extension.


Oracle Applications consists of several types of Concurrent Managers.But it also gives the end-user flexibility to define any Concurrent Manager and in any number, as per the requirement.

Key Managers pre-defined by Oracle:

1. Internal Concurrent Manager (ICM)
2.Conflict Resolution Manager (CRM)
3. Standard Manager (SM)


ICM

Controls all other CM's.
Main task is to ensure all other CM's are up and running.
It also starts and stops Service Manager's on each node .
It sets the no. of active processes, monitors, restarts and terminates all other conc. processes through requests made to the service manager.

ICM in turn is monitored by Internal Monitor, is responsible for starting the failed ICM in a local node.
IMP: There should be an IMON defined on each node.


CRM

Takes care of resolving the program incompatabilities and checks if a request in a queue can be run in parallel with the running request.

SM

Is always running (24 hours , 365 days ) and can take care of processing any concurrent request.
In case a request has no defined Manager to take care, SM takes care of it.


Starting And Stoping Concurrent Manager
===============================

In Oracle Applications 11i all startup shutdown scripts (let's say control Scripts ) in 11i(11.5.10) are in $OAD_TOP/admin/script/$CONTEXT_NAME where $OAD_TOP is also called as $COMMON_TOP and $CONTEXT_NAME is your SID_hostname.

The script to start/stop concurrent manager is adcmctl.sh where ad is application dba , cm is concurrent manager & ctl means control.

When you run adcmctl.sh it records execution of this command in text file with name adcmctl.txt at directory $COMMON_TOP/admin/log/$CONTEXT_NAME.

Remember adcmctl.sh call's another script "startmgr" which in turn calls "batchmgr" in $FND_TOP/bin and this is actual file which kicks up Internal Concurrent Manager Process (ICM) .
Lets check important parameter in this file

1. DISPLAY Set it to some valid XServer , if this is not set properly your reports display will fail (specially one with PDF or Bar code dislay)

2. DIAG_PARAM Diagnosis parameter it will take value Y or N with default N, If you encounter some error while starting Concurrent Manager you change this to Y and then extra logging will be enabled then check Concurrent Manager log file.

3. CONCSUB stands for CONC(Concurrent) SUB(Submit) , used to submit concurrent request like shut down concurrent manager.

4. SLEEP holds the number of seconds that the manager should wait between checks for new requests.

5. MGRNAME is the name of the manager for locking and log purposes. So you can find if this is icm(Internal Concurrent Manager), sm(Service Manager)

6. RESTART is set to N if the manager should not restart itself after a crash. Otherwise, it is an integer number of minutes. The manager will attempt a restart after an abnormal termination if the past invocation lasted for at least RESTART minutes.

7. PMON is the duration of time between process monitor checks (checks for failed workers). The unit of time is concurrent manager iterations (request table checks). Default Value is 20 .

8. QUESIZ is the duration of time between worker quantity checks (checks for number of active workers). The unit of time is process monitor checks.

Note -> PMON, QUESIZ and SLEEP are important for Concurrent Manager Tuning.


(A)adcmctl.sh apps/<>
(B)By findinging the FNDLIBR process on the server and Killing the same by issuing Kill -9.
(c)Individual CM's can be deactivated from the Forms using the navigation >
Concurrent > Manager > Administer
(D) Using the CONCSUB utility.

CONCSUB username/passwd SYSADMIN 'system Administrator' SYSADMIN WAIT=Y CONCURRENT FND ABORT

How to find Concurrent Manager Node :

1. SQLPLUS> select node_name from apps.fnd_nodes where support_cp='Y';

2. In context file (SID_hostname.xml ) under $APPL_TOP/admin , check for variable

< oa_var="s_isConc">YES< / TIER_NODE>,

YES means this is Concurrent Manager Node.

3. From Front-end,Check for Administer Concurrent Manager request under SYSADMIN responsibility.

4. From Server , "ps -ef grep FNDLIBR" under application User on all nodes where FND (Foundation) LIBR(Library) is executable.

No comments: