Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, April 30, 2019

Concurrent Manager in Details:

Types of concurrent manager:

Internal Concurrent Manager (ICM) It is considered as the “brain” of concurrent processing.Its main task is to make sure that all other concurrent managers are up and running. It controls other manager through the requests made to the service manager. It also starts, stops and restarts the service manager for all nodes. It Activate/Deactivate/Abort Concurrent Manager and Terminate Concurrent Request. It Executes “control requests” submitted by the administrator. It Sets the target number of processes for each service based on the current work shift.

>If the ICM goes down,no need to kill all the managers,simply start the internal manager.
>ICM does not run or schedule any requests.

Standard Manager:Standard Manager is the master concurrent manager. It is always running and can take care of processing any concurrent request. If at all, no other manager is assigned to a program, that program will be picked by standard manager.

Conflict Resolution Manager:Conflict Resolution Manager (CRM) functions to check concurrent program definitions for incompatibility rules. However, the ICM can be configured to take over the CRM’s job to resolve incompatibilities.It takes care of resolving the program incompatibilities and checks if a request in queue can be run in parallel with the running request. If a program is identified as run alone, then it prevents concurrent managers from starting other programs in the same conflict domain.It  can using profile options “Concurrent: Use ICM”. Set it to “Y” to enable and disable “N”.

Internal monitors:Internal Monitors are used specifically in PCP to allow for ICM failover to other available middle tier nodes.Internal Monitors are seeded on every registered node by default.

Service Manager:FNDSM is the Service manager.It act as an agent of the ICM.

Transaction Manager:The transaction manager is responsible for taking the load off the concurrent request table for pooling the request submitted by the user.The transaction manager takes care of these requests and sends it to standard manager directly.In a RAC environment the Transaction manager is required to be activated on each node of the RAC environment.

Transaction Managers run synchronous processing of certain reports requested from a client Program but run as a server side program. These managers run as immediate programs, are started automatically by the ICM, and communicate with Transaction Managers automatically. Running the job is transparent to the calling user as the job runs extremely quickly and in real time. The calling client is notified of the ultimate outcome of the program Execution by a completion message and a set of values returned to them.A Transaction Manager is owned by an application and associated with a data group. Due to this association, and the fact that it runs immediate programs, the Transaction Manager can only run programs contained within its program Library.

Scheduler Manager:The Scheduler Manager, added in 11i, assists the ICM and the CRM in scheduling and conflict resolution.

Behind the scene when a concurrent request is submitted:

1) Once a concurrent request is submitted by the user, the table FND_CONCURRENT_REQUESTS is automatically updated with the details of the request. The table is also updated with the information about the schedule of the concurrent request whether it’s immediately scheduled or scheduled at a fixed time.

2)a) If the request is incompatible/constraints defined ,Once the request time to run is arrived,it status is set to pending/Standby.Now the conflict resolution manager takes care of the request and finds out what are the incompatibilities and set the status pending normal when the incompatibilities are cleared.

b) If there are no incompatibilities then Once the request time to run is arrived,it status is set to pending/Normal

c) ALL the standard concurrent Manager and special manager continuously poll the FND_CONCURRENT_REQUESTS table .The job of a concurrent manager is to execute concurrent requests that are in Pending / Normal phase / status and that it is qualified to run according to its specialization rules.
Concurrent Manager Processes
– Act independently
– Select only requests that: (a) match the manager specialization rules, (b) are Pending/Normal, (c) have a requested start time <= sysdate

d) Once the request is processed, the FND_CONCURRENT_REQUESTS table is updated with the status.

Concurrent manager hangs for below few reason:

The concurrent manager hangs due to many reasons, few of them are as below:

  •  Pending/standby requests are too many
  • The database is hanging may be because the archive log files have filled
  • Long running jobs
  • The internal manager was activated by someone other then owner of the application system
  • The operating system files system is full
  • It’s not able to create the log file
  • You’ve shut down the internal manager, but actual has a number in it.

Manager is Inactive/No Manager:

If a concurrent request is on hold or unable to run when there are no active manager processes that can run the request, the request is placed in an Inactive phase.

1.Verify that Internal Concurrent Manager(ICM) is up and running.


Most common reason for the "inactive: No manager" message is that the conrurrent manager is shut down and needs to be started

However, if the Concurrent:Conflicts Domain at the responsibility level didn't exist in the Conflict Domain screen causing the request to go into "Inactive - No Manager state".
if the manager is up but it is showing the inactive-nomanager then check for the log file and do the needful.

As my idea y dont u try with cmclean.sql.(not supported by oracle)
1.Bring down CM.
2.run cmclean.sql

3.Bring up CM.

2. Verify that there is at least one active concurrent manager with/without specialization rules that allow the concurrent program to run.

Define rules identifying which requests a concurrent manager can read. 

Another reason could be,  you might have included some program under 'Specialization Rules' for the concurrent manager . If you include any program that means all other program get excluded automatically. So all the requests stay in inactive manager status

i. Run the following query to check whether any specialization rule defined for any concurrent manager that includes/excludes the concurrent program in question. Query returns 'no rows selected' when there are no Include/Exclude specialization rules of Program type for the given concurrent program.
select 'Concurrent program '||fcp.concurrent_program_name||' is ' ||decode(fcqc.include_flag,'I','included in ','E','excluded from ')||fcqv.user_concurrent_queue_name specialization_rule_details from fnd_concurrent_queues_vl fcqv,fnd_concurrent_queue_content fcqc,fnd_concurrent_programs fcp where fcqv.concurrent_queue_id=fcqc.concurrent_queue_id and fcqc.type_id=fcp.concurrent_program_id and fcp.concurrent_program_name='<PROGRAM_SHORT_NAME>';

Note: Program Short Name is visible when the program is queried in concurrent program definition form.

Example:
SQL> select 'Concurrent program '||fcp.concurrent_program_name||' is ' ||decode(fcqc.include_flag,'I','included in ','E','excluded from ')||fcqv.user_concurrent_queue_name specialization_rule_details from fnd_concurrent_queues_vl fcqv,fnd_concurrent_queue_content fcqc,fnd_concurrent_programs fcp where fcqv.concurrent_queue_id=fcqc.concurrent_queue_id and fcqc.type_id=fcp.concurrent_program_id and fcp.concurrent_program_name='OKCRAQE';

SPECIALIZATION_RULE_DETAILS
-----------------------------------------------------------------------------
Concurrent program OKCRAQE is included in Contracts Core Concurrent Manager
Concurrent program OKCRAQE is excluded from Standard Manager
From the sample output above, it shows that the OKCRAQE(Listener for Events Queue) concurrent program has been excluded from the Standard Manager and included in Contracts Core Concurrent Manager. That means the concurrent request OKCRAQE can be run only by the Contracts Core Concurrent Manager which should be up and running to run and complete the OKCRAQE concurrent request.
Make sure that Concurrent Manager whose specialization rule includes the concurrent program is up and running.
ii. Ensure that standard concurrent manager is up and running.
Follow the below step only when you have confirmed the previous points and the issue is still remaining as there may be an issue with concurrent request queue view.
3. Manually re-create the concurrent request queue view for concurrent managers by entering the following command as an applmgr user at operating system prompt.
FNDLIBR FND FNDCPBWV apps/<pwd> SYSADMIN 'System Administrator' SYSADMIN

Successful completion of the above command shows the message "View created successfully" in the generated log file.

The concurrent request queue view is used internally to map requests to managers. This view would be regenerated when concurrent managers are created, or specialization rules are altered.
==========================
"Include Specialization Rule" Exists for the Standard Manager.

Solution:
1. Log into Applications.
2. Navigate: System Administrator / Concurrent / Manager / Define.
3. Query for 'Standard'.
4. Click Specialization Rules.
5. Remove any Include Rules from the Specialization Rules for Standard Manager.
6. Restart the Managers to test.

The profile 'Concurrent:Conflicts Domain' at responsibility level of the problematic resp is set to a value by mistake.With a value to the profile means specifying a conflict domain for data group of the responsibility. A conflict domain identifies the data where two incompatible programs cannot run simultaneously. This will lead all the requests submit from the responsibility inactive with no manager.

Solution:

To implement the solution, please execute the following steps:

1. Go to the responsibility: System Administrator.

2. Navigate to Profile > System.

3. Select the problematic responsibility and find profile 'Concurrent:Conflicts Domain', clear out value of this profile at the responsibility level and save.

4. Retest the issue.

5. Migrate the solution as appropriate to other environments.


In general, If manager is not processing any requests, there can only be few reasons:


 1) Specialization rules prohibits processing any requests (<Note 1311526.1>)
 2) Program with Run alone flag is submitted with pending or running statusn
 3) All the Managers are all busy.
 4) Concurrent Program has crashed and managers are still waiting for completion.
 5) Concurrent Managers have crashed and somehow not recovered yet .



But here , Concurrent Request ID 2728699 is "Periodic Alert Scheduler" which is set to Run alone flag Y.

Runalone means exactly what it says. It means that it runs alone, no other requests can be running. It also means that it cannot start until no other requests are running. "Periodic Alert Scheduler" was waiting for other "Running" requests to complete. Once running requests are completed,then "Periodic Alert Scheduler" will begin to run and complete. Until then "Periodic Alert Scheduler" will prevent other Concurrent Requests from being executed; and leaving them in Inactive/No Manager status. This is the root-cause of the issue.

Run the Below query to identify the programs that are Run alone flag enabled.
SQL> select request_id from fnd_concurrent_requests
where CONCURRENT_PROGRAM_ID in (
SELECT CONCURRENT_PROGRAM_ID
FROM FND_CONCURRENT_PROGRAMS_VL
WHERE RUN_ALONE_FLAG='Y');

Solution:

Remove Run alone: Y for the "Periodic Alert Scheduler".

Following documents which discuss a similar topic:

Concurrent Requests stay Pending / Standby and Inactive/No Manager forever ; Concurrent Manager Up but does not process requests (Doc ID 2083388.1)

Concurrent Program Spawns Child That is Going to Inactive No Manager (Doc ID 1621537.1)

Concurrent Request Immediately After Submission Ends Up With Inactive Phase and No Manager Status (Doc ID 1947558.1)

All Requests Submitted from A Specific Responsibility are 'Inactive' with 'No Manager' (Doc ID 1539937.1)

Concurrent Requests Are In 'Inactive' 'No Manager' Status in RAC Environment (Doc ID 431022.1)

Concurrent Processing: What to Do When Concurrent Requests Are Not Processing and Have Inactive No Manager Status? (Doc ID 1311526.1)

Phase/Status of  CM:

A concurrent request has a life cycle consisting of the following phases: Pending, Running, and Completed. During each phase, a request has a specific status. Listed below are the possible statuses for each phase:
Pending Phase - Normal, Standby, Scheduled, Waiting
Running Phase - Normal, Paused, Resuming, Terminating
Completed Phase - Normal, Error, Warning, Cancelled, Terminated
Inactive Phase - Disabled, On Hold, No Manager

Variables/Executables for CM
$APPLCSF  is the top-level directory in which the Concurrent Manager puts log and output files.
$APPLLOG & $APPLOUT are the subdirectories in which the Concurrent Manager puts log and output files.
$APPLTMP is the directory in which Oracle Applications temporary files are created.
$APPLPTMP is the directory in which PL/SQL output files are created.
Note: The value must be exactly the same as “utl_file_dir” value in init.ora parameter file.
FNDLIBR ( executable ) The ICM (Internal Concurrent Manager) spawns FNDLIBR processes based on the concurrent manager definitions. The number of FNDLIBR processes at the operating system level will be equal to the total number of max requests for each Oracle concurrent manager defined plus one for the ICM.

Concurrent Managers Tables in R12
FND_CONCURRENT_PROCESSES FND_CONCURRENT_REQUESTS
FND_CONCURRENT_QUEUES
FND_CONCURRENT_PROGRAMS
FND_CONCURRENT_PROCESSES — Lists information about managers; Useful for determining UNIX and Oracle process is associated with managers; Identifies logfiles associated with managers.

FND_CONCURRENT_REQUESTS — Primary jobs submission table; Queried by the managers; Jobs are inserted into this table; Table can grow rather large thus affecting performance; Cleanup scripts available with the Applications.

FND_CONCURRENT_PROGRAMS –Stores information about concurrent programs. Each row includes a name and description of the concurrent program. Each row also includes the execution methods for the program (EXECUTION_METHOD_CODE), the argument method (ARGUMENT_METHOD_CODE), and whether the program is constrained (QUEUE_METHOD_CODE).

What is actual and target in concurrent manager?

In the administer concurrent manager form, there are two columns target and actual. Target columns lists the number of processes that are running for each manager for a particular work shift. The actual column that is currently how many processes are running.

How do I increase concurrent manager processes in r12?

To allocate more processes to a manager, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Manager -> Define. Increase the number in the Processes column.

How do I clean out the Concurrent Manager tables?
Run the script, cmclean.sql, article Note 134007.1

How do we process more concurrent requests concurrently?
Login as a Sysdba and navigate ->Concurrent -> Manager -> Define and Query for the relevant concurrent manager), done in two steps: (i) Increase the Number of Target processes for the manager (ii) Change the cache size of the concurrent manager.

Flow of a Concurrent Request

Once Concurrent Request is submitted the following things happen ->

A. FND_CONCURRENT_REQUESTS table is updated with the request with scheduled time.
B. Once request is scheduled the concurrent manager checks the table FND_CONCURRENT_TABLES to find out if there is any incompatibility in program.
C. If there is any incompatibility CRM [Conflict Resolution Manager] takes care.
D. For no incompatibility it first checks whether there is any special manager who can take care the request else standard manager takes care.
E. Once completed FND_CONCURRENT_REQUEST table is updated with status.

Some Important phases of concurrent manager

Standby = Request is put in standby mode while CRM is resolving the incompatibility.
No Manager = CM is down or no manager was defined.
Disabled = Concurrent Program is disabled.

Specialization Rules
If we want to run certain types of request only and include and exclude some Cons Request the this screen is used.
A specialization rule associates an action with a type of request. There are two kinds of actions: Include and Exclude.
  • Include defines a manager to only read requests of the type specified.
  • Exclude defines a manager to read all requests except the type specified.
To prevent the Standard manager from running a particular program we need to exclude the concurrent program from Standard manager.

Work Shifts
It defines the time for which the concurrent manager will be active. To define workshifts go to Concurrent > Manager > Work Shifts.

Sleep Seconds – Amount of time the manager waits between checking for pending requests. 


How to Create a Custom Concurrent Manager in oracle application?
Below is the steps to create custom concurrent manager in oracle apps 11i/R12.

1. Navigate to Concurrent----> Manager----> Define.
2. Manager Field: Custom Manager.
3. Short Name: CUSTOM.
4. Type: Concurrent Manager.
5. Program Library: FNDLIBR.
6. Enter desired cache.
7. Work Shifts: Standard.
8. Enter number of Processes.
9. Provide Specialization Rules (you can include or exclude program, id, user, types or combination).
10. Save.
11. Navigate to Concurrent / Manager / Administer.
12. Activate the Custom Manager.

How to Create a Custom Concurrent Manager (Doc ID 170524.1)
How To Set Concurrent Program To Run Exclusively From A Custom Manager (Doc ID 2268941.1)

When I run a Concurrent request I get Phase – Pending and the Status – Standby. What does pending standby means and how to fix it ?
Pending Standby  - Phase Pending and Status Standby means Program to run request is incompatible with other program(s) currently running.

Why concurrent request is in pending standby mode for long time ?

Cause:

Phase code Pending and Status code Standby means concurrent request has been processed by ICM (Internal Concurrent Manager) , however it is held by CRM(conflict resolution manager) due to incompatibilities with other programs that are currently running. One more possibility of pending standby is CRM itself is not available / not running.

Solution:

i. Through SYSADMIN login go to System Administrator responsibility -> concurrent manager -> CRM And check if it is running state if not then activate the same
ii. In above scenario if CRM is running and still concurrent request is in pending standby state then click on verify button and resubmit the request.
iii. if above two steps doesn't help then application developer intervention is required to re-validate the
incompatibilities in application developer responsibility -> concurrent -> program -> Incompatibilities

In administer concurrent manager form, what is the significance of the verify button and for which manager's it's available?

The verify button becomes enable only when you select the internal manager. One of the functions of the internal manager is to monitor the processes of each concurrent manager. The process of monitoring the other concurrent manager by internal manager is known as the PMON cycle. When you click the verify button you can force the process monitoring or the PMON activity to occur. The verify button is also available for the conflict resolution manager which checks for the program incompatibilities.

When I run a request in GL,the status appears Inactive and phase as No Manager. Please tell me what the problem could be ?
What to do if a request is Inactive/No Manager?

If a concurrent request is on hold or unable to run when there are no active manager processes that can run the request, the request is placed in an Inactive phase.

Verify that Internal Concurrent Manager(ICM) is up and running.

Verify that there is at least one active concurrent manager with/without specialization rules that allow the concurrent program to run.

Ensure that standard concurrent manager is up and running.

***
i) No manager is defined to run the request
or
ii) All managers are locked by run-alone requests
or
iii) Concurrent Manager Service is down
or
iv) No concurrent manager process because of workshift
To check Work Shift for any Concurrent Manager From System Administrator responsibility > Concurrent > Manager > Define > Work Shifts > Processes

Answer: This is quite tricky questions
a) Make certain that there is at least one active manager with specialization rules that allow the program.
b) If you have confirmed the previous point, then the problem may be a stale Worker Request View
– The view is used internally to map requests to managers
– The view is regenerated when managers are created, or specialization rules are altered
c) You can manually regenerate the view
FNDLIBR FND FNDCPBWV apps/apps SYSADMIN ‘System Administrator’ SYSADMIN


 How can we enable/disable Conflict Resolution Manager?

Answer: It can be done using profile options “Concurrent: Use ICM”. Set it to “Y” to enable the Conflict Resolution manager. To disable it, set the profile option to “N”.

What is a Child Request?
A child request is a concurrent request submitted by another concurrent request.

http://www.moreajays.com/2017/12/interview-questions-on-concurrent.html

No comments:

Post a Comment