Beruflich Dokumente
Kultur Dokumente
Concurrent
Managers
Mris Elsi
Senior Oracle Applications DBA
Tieto Latvia,
Maris.Elsins@tieto.com
Who I am?
8 years in IT
Certificates
10g OCM
Conferences
UKOUG 2007/2008/2010
LVOUG 2009/2010
Why it is important?
DBA has to be quick when solving real issues
Knowing the process before the problems happen decreases solving
time
Querying DB objects is faster then navigating through Forms
Knowing the process is important when tuning the setup of
Concurrent Managers
3
2010-11-29
FND_CONCURRENT_REQUESTS (FCR)
FND_CONCURRENT_PROGRAMS (FCP)
FND_CONCURRENT_QUEUES (FCQ)
FND_CONCURRENT_PROCESSES (FCPROC)
FND_CONCURRENT_PROGRAM_SERIAL (FCPS)
FND_CONC_RELEASE_CLASSES (FCRC)
FND_LOOKUPS (FL)
FND_CONCURRENT_WORKER_REQESTS (FCWR)
FND_CRM_HISTORY (FCH)
FND_CONC_WAITING_REQUESTS
2010-11-29
2010-11-29
INACTIVE (I)
Disabled (U)
On Hold (H)
No Manager (M)
PENDING (P)
Normal (I)
Standby (Q)
Scheduled (P)
Waiting (Z)
RUNNING (R)
COMPLETED (C)
Normal (R)
Paused (W)
Resuming (B)
Terminating (T)
2010-11-29
Normal (C)
Error (E)
Warning (G)
Cancelled (D)
Terminated (X)
Pending / Standby
Time to execute the request has arrived
Request waits for to be evaluated by the Conflict Resolution Manager
Pending / Normal
Request is allowed to be executed
Request is waiting to be picked up by Concurrent Manager
Running / Running
Request is beeing executed by a concurrent manager
Completed / Normal
2010-11-29
Pending/Scheduled is actually
STATUS_CODE=Q+(FCR.REQUESTED_START_DATE>SYSDATE)
Why so complicated?
No need to update statuses too often
2010-11-29
Pending / Scheduled
2010-11-29
Schedule types
As Soon as Possible/Once
FCR.REQUESTED_START_DATE
Periodically/On Specific Days
FND_CONC_RELEASE_CLASSES (FCRC)
Join with FCR on column RELEASE_CLASS_ID
FCRC.DATE1 - Start at field in the form
FCRC.DATE2 - End at field in the form
FCRC.CLASS_TYPE P for Periodically, S for On Specific
days
FCRC.CLASS_INFO actual schedule data
10
2010-11-29
Periodic schedules
FCRC.CLASS_INFO contents
Values like X:Y:Z
X number of months/weeks/days/hours/minutes the request has to
be rescheduled from prior run.
Y time units: M months, D days, H hours, N minutes
Z rescheduling type: S from the start of the prior run, C
from the completion of the prior run.
Samples
30:N:S Repeat every 30 minutes from the start of the prior run
5:N:C Repeat every 5 minutes from the completion of the prior run
12:H:S Repeat every 12 hours from the start of the prior run
11
2010-11-29
Samples
000000000000000000000000000000000000001 Days of week:
Sa
111111111000000000000000000000000111110 Dates: 1 2 3 4 5 6
7 8 9. Days of week: Mo Tu We Th Fr
000000000000000000000000000000010000000 Last day of
month
12
2010-11-29
13
2010-11-29
Pending / Standby
14
2010-11-29
Each itereation
1. If FCQ.CONTROL_CODE=V, reload incompatibility rules (?)
2. Lock STATUS_CODE for all Pending/Normal and Pending/Scheduled
requests
3. Check each Pending request against the incompatibility rules and verify
there are running concurrent managers that can process them
(FND_CONCURRENT_WORKER_REQUESTS)
1. Release Pending/Standby requests, which dont break any rules
2. Return Pending/Normal requests, which break some rules (?)
4. Record statistics in FND_CRM_HISTORY
5. Sleep for Sleep Seconods
15
2010-11-29
Interesting DB objects
FND_CONCURRENT_WORKER_REQUESTS
View returning mappings of requests and concurrent managers able
to execute them
Definition of the view contains hardcoded IDs according to the
Specialization Rules of Concurrent Managers
Rebuilt by Build Concurrent Request Queue View request on
change of Specilaization rules
FND_CRM_HISTORY
Good information for tuning and troubleshooting
Records statistics for each CRM run, stotistics include:
REQUESTS_EXAMINED
REQUESTS_STANDBY
REQUESTS_RELEASED
REQUESTS_RETURNED
Can be joined with FCR to find out how many requests were
released in each RCM execution iteration
FCR.CRM_RELEASE_DATE between FCH.WORK_START AND FCH.WORK_END
16
Tieto Corporation
2010
Purged
by Purge Concurrent Request and/or2010-11-29
Manager Data,
Graphing FND_CRM_HISTORY
17
2010-11-29
18
2010-11-29
Pending / Normal
19
2010-11-29
20
2010-11-29
Select R.Rowid
From Fnd_Concurrent_Requests R
Where R.Hold_Flag = 'N'
And R.Status_Code = 'I'
And R.Requested_Start_Date <= Sysdate
And (R.Node_Name1 is null or
(R.Node_Name1 is not null and
FND_DCP.target_node_mgr_chk(R.request_id) = 1))
(R.PROGRAM_APPLICATION_ID,
R.CONCURRENT_PROGRAM_ID) IN
((0, 98), (0, 100), (0, 31721), (0, 31722), (0, 31757)))
AND ((R.PROGRAM_APPLICATION_ID, R.CONCURRENT_PROGRAM_ID)
NOT IN
((510, 40032),
(510, 40033),
(510, 42156),
(510, 42157),
AND EXISTS
(530, 43793),
(Select Null
From Fnd_Concurrent_Programs P
Where P.Enabled_Flag = 'Y'
And R.Program_Application_Id = P.Application_Id
And R.Concurrent_Program_Id = P.Concurrent_Program_Id
AND EXISTS
(Select Null
From Fnd_Oracle_Userid O
Where R.Oracle_Id = O.Oracle_Id
AND EXISTS (Select Null
From Fnd_Conflicts_Domain C
(530, 43794),
(535, 42626),
(535, 42627),
(535, 42628)) AND
((R.REQUEST_CLASS_APPLICATION_ID IS NULL AND
R.CONCURRENT_REQUEST_CLASS_ID IS NULL) OR
(R.REQUEST_CLASS_APPLICATION_ID,
R.CONCURRENT_REQUEST_CLASS_ID) NOT IN ((0, 2)))))
ORDER BY NVL(R.priority, 999999999), R.Priority_Request_ID,
R.Request_ID
Distributed
Concurrent
Processing
implementation
Run
Alone
flag
implementation
with
Conflict
domains
Implementation
Exclusion
Exclusion
Execution
specialization
of
Immediate
Specialization
order
for
rules
concurrent
type
rule
forexecutables
concurrent
for Request
programs
(Subroutines)
type
Query
only
Pending/Normal
requests
21
2010-11-29
22
2010-03-26
From Fnd_Concurrent_Requests Sr
SELECT ...
FROM fnd_concurrent_requests
fnd_concurrent_programs
fnd_application
fnd_user
R,
P,
A,
fnd_oracle_userid
O,
fnd_conflicts_domain
C,
fnd_concurrent_queues
fnd_executables
U,
fnd_application
Q,
A2,
E,
fnd_conc_request_arguments X
WHERE R.Status_code = 'I'
And ((R.OPS_INSTANCE is null) or (R.OPS_INSTANCE = -1) or
(R.OPS_INSTANCE =
decode(:dcp_on, 1, FND_CONC_GLOBAL.OPS_INST_NUM,
R.OPS_INSTANCE)))
And R.Request_ID = X.Request_ID(+)
And R.Program_Application_Id = P.Application_Id(+)
And R.Concurrent_Program_Id = P.Concurrent_Program_Id(+)
And R.Program_Application_Id = A.Application_Id(+)
And P.Executable_Application_Id = E.Application_Id(+)
And P.Executable_Id = E.Executable_Id(+)
And P.Executable_Application_Id = A2.Application_Id(+)
And R.Requested_By = U.User_Id(+)
(R.PROGRAM_APPLICATION_ID, R.CONCURRENT_PROGRAM_ID) IN
((0, 98), (0, 100), (0, 31721), (0, 31722), (0, 31757))) AND
((R.PROGRAM_APPLICATION_ID, R.CONCURRENT_PROGRAM_ID) NOT IN
((510, 40032),
(510, 40033),
(510, 42156),
(510, 42157),
(530, 43793),
(530, 43794),
(535, 42626),
(535, 42627),
(535, 42628)) AND
((R.REQUEST_CLASS_APPLICATION_ID IS NULL AND
R.CONCURRENT_REQUEST_CLASS_ID IS NULL) OR
(R.REQUEST_CLASS_APPLICATION_ID,
R.CONCURRENT_REQUEST_CLASS_ID) NOT IN
((0, 2)))))
FOR UPDATE OF R.status_code NoWait
23
2010-11-29
24
Not hard to get to point where FCR queries are TOP SQLs in DB
Even more important if you have RAC
The key is to minimize the number of concurrent manager processes
Cache size and sleep seconds have some effect
2010-11-29
Cache size
Large cache sizes make changes of request priorities less effective
(do you use different priorities)
Small cache size is OK for Long-running requests queue
Larger cache sizes are OK for Short-running requests queues that
have few concurrent manager instances.
Large cache size increases the number of failed attempts to lock the
status code.
25
2010-11-29
Running / Normal
26
2010-11-29
ss,
gv$process
pp,
gv$instance
gi,
applsys.fnd_concurrent_processes cp
where request_id = &request_id
pp.addr(+)
= ss.paddr
2010 Tieto
Corporation
2010-11-29
Completed / Normal
and also the presentation is
Completed/Normal
28
2010-11-29
Thank you!
?
29
2010-11-29
Mris Elsi
Senior Oracle Applications DBA
Tieto Latvia,
Maris.Elsins@tieto.com