Wednesday, September 25, 2013

How To Find the Meanings of Various Status Codes

Goal:
How to interpret the different status_codes for fnd_concurrent_requests and various process_status_codes for fnd_concurrent_processes.

SOLUTION :

Applications maintains this type of information in FND_LOOKUPS view.

The following query would provide you the information regarding the process_status_code and its meaning for fnd_concurrent_processes.

SQL>select lookup_code, meaning from fnd_lookups where lookup_type ='CP_PROCESS_STATUS_CODE'

LOOKUP_CODE         MEANING
------------                    ---------
A                              Active
C                              Connecting
D                              Deactivating
G                              Awaiting Discovery
K                              Terminated
M                              Migrating
P                              Suspended
R                              Running
S                              Deactivated
T                              Terminating
Z                              Initializing

The following query would provide you the information regarding the status_code and its meaning for fnd_concurrent_requests.

SQL> select lookup_code, meaning from fnd_lookups where lookup_type ='CP_STATUS_CODE';

PROCESS_STATUS_CODE Column:  
~~~~~~~~~~~~~~~~~~~~~~~~~~~
    A Waiting  
    B Resuming  
    C Normal  
    D Cancelled 
    E Error  
    F Scheduled  
    G Warning  
    H On Hold  
    I Normal  
    M No Manager  
    Q Standby  
    R Normal  
    S Suspended  
    T Terminating  
    U Disabled  
    W Paused  
    X Terminated  
    Z Waiting  

Phase code is also returned from FND_LOOKUPS where the lookup_type is 'CP_PHASE_CODE'

PHASE_CODE column
-----------------
    C Completed
    I Inactive
    P Pending

    R Running
+++++++ID 297909.1+++++++


Library Cache Locks Due to Invalid Login Attempts:

Slution :

SQL> select * from dba_ddl_locks where mode_held='Exclusive';

1. Check for bad or incorrect password or login attack by running following sql:

SQL> select username,
os_username,
userhost,
client_id,
trunc(timestamp),
count(*) failed_logins
from dba_audit_trail
where returncode=1017 and --1017 is invalid username/password
timestamp < sysdate -7
group by username,os_username,userhost, client_id,trunc(timestamp);
 
2. Set the below event in the spfile or init.ora file and restart the database:

SQL> alter system set event ="28401 TRACE NAME CONTEXT FOREVER, LEVEL 1" scope=spfile;

or

EVENT="28401 TRACE NAME CONTEXT FOREVER, LEVEL 1"

Note:
Care should be taken when setting this event, as this is disabling the sleep time which can leave the system more vulnerable to brute force password guessing attacks.
For full information on this issue please read the following note before deciding to set the event:
Document:7715339.8 Logon failures causes "row cache lock" waits - Allow disable of logon delay
In 11.1.0.7, if One off fix Patch 7715339 is applied, the delay is disabled  unconditionally, and there is no need to set the event.
NOTE: This issue is fixed in  :11.2.0.1 (Base Release)


++++++++++(Doc ID 1309738.1)+++++++++++++

Tuesday, September 17, 2013

Missing responsibilities in R12.1.3

SYMPTOMS :

When a new responsibility is added, it doesn't show up in the home page. The same problem happens even after clearing cache and removing cookies. Workflow Directory tables don't show corruption.

CAUSE :

LONG_RUNNING_JVM parameter was set to FALSE. TRUE is recommended value for R12.1.3.

This was the value for this parameter.
$ cd $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config
$ grep -i long_running oc4j.properties
LONG_RUNNING_JVM=false

Since the cache was not refreshed, the responsibilities didn't show up in the home page.

SOLUTION

 To implement the solution, please execute the following steps:

1. Change the LONG_RUNNING_JVM parameter to TRUE in the context file and run the autoconfig

2. Make sure the change is propagated to oc4j.properties
$ cd $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config
$ grep -i long_running oc4j.properties

Note: verify the changes on both
[oracle@svruatebsal1 ~]$  grep -i long_running $CONTEXT_FILE
                        <jms_cache oa_var="s_long_running_jvm">true</jms_cache>

[oracle@svruatebsal1 ~]$  cd $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config

[oracle@svruatebsal1 config]$ grep -i long_running oc4j.properties
                                    LONG_RUNNING_JVM=true

3. Bounce oafm

sh $ADMIN_SCRIPTS_HOME/adoafmctl.sh stop
sh $ADMIN_SCRIPTS_HOME/adoafmctl.sh start

4. Retest the issue.

5. Migrate the solution as appropriate to other environments.


+++++++++++(Doc ID 1423432.1) +++++++++++
Troubleshooting Missing Responsibilities For A User (Doc ID 429852.1)

User Administration and Setup How To, Troubleshooting, and Error Message Document (Doc ID 1581282.1)


How Tos:
To Change Passwords Using FNDCPASS (Release 11i and 12i) (Doc ID 437260.1)
To Migrate Passwords to Non-Reversible Hash Password Scheme Using FNDCPASS (Release 11i and 12i) (Doc ID 457166.1)
How to Setup Role Based Access Control (Release 11i and 12i) (Doc ID 1537100.1)
How to Verify When User is Locked Out of Applications (Release 11i and 12i) (Doc ID 332577.1)
To Change Passwords to Include Special Characters Using FNDCPASS (Release 12i) (Doc ID 1336479.1)
How to Setup Access to the Output of the Same Responsibility (Release 12i) (Doc ID 804296.1)
To Change Passwords to Include Special Characters Using FNDCPASS (Release 11i) (Doc ID 739814.1)
How to Change SYSADMIN Password (Release 11i) (Doc ID 1066661.1)


Troubleshooting:
When Troubleshooting Missing Responsibilities For A User (Release 11i and 12i) (Doc ID 429852.1)
When Troubleshooting FNDCPASS (Release 11i and 12i) (Doc ID 1306938.1)
When Collecting Responsibilities/Roles and User Information (Release 11i and 12i) (Doc ID 742062.1)
When Responsibilities Disappear Navigating Back to Homepage (Release 12i) (Doc ID 1316974.1)
When DBLinks are Lost After Changing User Password (Release 11i) (Doc ID 867022.1)
When Users Aren’t Forced to Reset Password After Running FNDCPASS (Release 11i) (Doc ID 785909.1)
When Performance is Slow for FNDSCAUS, Define User, Form (Release 11i) (Doc ID 391902.1)
When Unable to Edit Security Group Field in FNDSCAUS Form (Release 11i) (Doc ID 351587.1)
When Information in Description Field of FNDSCAUS is not Saved (Release 11i) (Doc ID 762821.1)


Error Messages:
Cannot complete applications logon. You may have entered an invalid applications password, or there may have been a database connect error. (Release 11i and 12i) (Doc ID 809155.1)
Routine AFPCSQ encountered an ORACLE error. ORA-01005: null password given; logon denied (Release 11i and 12i) (Doc ID 553807.1)
APP-FND-00434: AFPRCP:Failed to initialize profile option values (Release 11i and 12i) (Doc ID 567636.1)
APP-FND-01929 (Release 11i and 12i) (Doc ID 977903.1)
FNDCPASS was not able to decrypt password (Release 12i) (Doc ID 1377670.1)
APP-FND-02702: <ABM> is not a valid oracle user (Release 12i) (Doc ID 743513.1)
ORA-01017: invalid username/password; logon denied in 11g database (Release 12i) (Doc ID 749897.1)
ORA-01017: invalid username/password; logon denied (Release 12i) (Doc ID 751868.1)
ORA-01017: invalid username/password; logon denied (Release 11i) (Doc ID 733427.1)
APP-FND-01496: Cannot access application ORACLE password (Release 11i) (Doc ID 363513.1)
APP-FND-01564: ORACLE error 1403 in changepassword (Release 11i) (Doc ID 553052.1)
Oracle error -20002: ORA-20002: [WF_NO_USER] (Release 11i) (Doc ID 433216.1)
Unabled to call fnd_ldap_wrapper.update_user due to the following reason: OID is not registered correctly. Please contact system administrator. (Release 11i) (Doc ID 365378.1)
FRM-40735: ON-ERROR trigger raised unhandled exception ORA-01001 (Release 11i) (Doc ID 460354.1)

WFDS Data Collection Script (Doc ID 742062.1)

PURPOSE:

This script was created to collect the required information to determine the cause of missing responsibilities associated to one specific user.

INSTRUCTIONS:

sqlplus apps/<password>

SQL> @atg_supp_fnd_usr_resp.sql

Parameter: 
User_Name in uppercases 

Output file 
wf_<UserName>_wfds.html


Note : Need to download atg_supp_fnd_usr_resp.sql from MOS ID 742062.1
++++++++++++++
Oracle Workflow Release 12 Diagnostics (Doc ID 469822.1)

Saturday, September 14, 2013

How to resolve Pending or Erred Cost Manager or Cost Workers


1 Run cmclean.sql Note 134007.1 Non Destructive Script to Clean Concurrent Manager Tables 

2- Review Note 304313.1 Understanding Cost Manager 

3. Run and review Note 310000.1 Oracle Cost Management Interface Managers Activity Test 

4. Please do the following in this test instance where the issue is raised 

a. Restart Internal Manager,Inventory Manager and Inventory Remote Procedure Manager 
b. Perform gather statistics for INV, WIP, FND, and BOM schemas since these are the tables involved in
    the costing
c. Stop cost manager and all cost workers 
   Stop the Cost Manager Note 373207.1 

   Please query up the Cost Manager using System Administrator Responsibility/Requests/View - 
  Then select Specific Requests - In the Name field type --> Cost Manager (Note this is case 
  sensitive) and select Find. Verify that there is only one cost manager running - make sure there 
   is not one that is Terminating (this means it's not fully canceled) and let us know what you 
   find. Note this is also the Navigation to Cancel the cost manager. 

d. Make the profile options are set:
    MRP:Debug Mode to YES
    MRP: Trace Mode to Yes
    CST:Cost update Debug Level to FULL

e. Relink your CMCTCM (Cost Manager), CMCMCW ( Material Cost Transaction Worker), CMCACW (Actual Cost Worker), and CMCLCW ( Layer Cost Worker) executable.  Refer to  Note 69798.1 for tips on relinking  an executable.  See 
    Note 99768.1 AD Utilities: Functionality in Regards to Applications Maintenance 
    Note.131321.1 How to Relink Oracle Database Software on UNIX 
    Note.69798.1 Basics of Relinking an Executable or Binary in an Oracle 
                                     Developer Environment 

f. Uncosted/failed transactions can be resubmitted through the application itself. 
    Costs -> View Transactions -> Material Transactions. 
    From the menu, Tools Select All: Tools Submit All 

    Else, use the following script to submit the records in MMT table: 

    update mtl_material_transactions MMT
    set MMT.costed_flag = 'N',
    MMT.error_code = NULL,
    MMT.error_explanation = NULL,
    MMT.transaction_group_id = NULL,
    MMT.transaction_set_id = NULL
    where MMT.organization_id = &organization_id
    and MMT.costed_flag in ('N','E')
    and NOT  EXISTS ( SELECT 1
    FROM MTL_TRANSACTION_ACCOUNTS MTA
    WHERE MMT.TRANSACTION_ID = MTA.TRANSACTION_ID);
g.
commit;
h. Re-start the cost manager. 
    Restart the cost manager via Inventory > Setup > Transactions > 
    Interface Managers > Tools > Launch Manager. Set up a periodic scheduling interval of every five  
    minutes. 
    Note -- Cost Manager should not be scheduled through request form to run Periodically. 
               Cost Manger  should be scheduled through Interface managers only.

5. Upload and review Cost Manager and Cost worker log,Raw and Tkprof Trace files
    (See Note 199081.1 for questions on TKPROF and
    Note 296559.1-- FAQ: Common Tracing Techniques

6. For the Organization and period in question, upload completed spooled file CstDiag115.txt after 
    running CstCheck.sql and output of BDEprdcls.sql Diagnostics Scripts (see Note 246467.1) If 
    prompted by customer id , just enter your company name. 

7. R11i: Provide the output of the Inventory Period Closing Activity Test from Note 206576.1


Note:

Run the following sql to identify the hung process:

SELECT request_id RequestId,
request_date RequestDt,
phase_code Phase,
status_code Status FROM
fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp
WHERE fcp.application_id = 702 AND
fcp.concurrent_program_name = 'CMCTCM' AND
fcr.concurrent_program_id = fcp.concurrent_program_id AND
fcr.program_application_id = 702 AND fcr.phase_code <> 'C'

The output of the above query would be Request Id , Time Stamp, Status Code and
Phase Code similar to the example below:

5296078 8/16/2006 10:19:02 PM P I

The Status and Phase codes are as follows:

PHASE CODE:
Value Meaning
I Inactive
P Pending
R Running
C Completed

STATUS CODE:
Value Meaning
U Disabled
W Paused
X Terminated
Z Waiting
M No Manager
Q Standby
R Normal
S Suspended
T Terminating
D Cancelled
E Error
F Scheduled
G Warning
H On Hold
I Normal
A Waiting
B Resuming
C Normal

Troubleshooting Uncosted Transactions:


1. Follow the steps for stuck costing provided in attached file  
    steps_to_be_followed_bde_stuck_cost.txt
2. Run the following and upload in excel.
If there are any errors in wip_cost_txn_interface please take corrective
actions as given in the WIP_TXN_INTERFACE_ERRORS which is given by query (b)
 a) select *
  from wip_cost_txn_interface wcti
 where process_status = 3
   and exists (  select 'x'
                from mtl_material_transactions mmt
 where mmt.transaction_action_id in (30,31)
   and mmt.costed_flag = 'N'
   and wcti.wip_entity_id = mmt.transaction_source_id
   and mmt.transaction_source_type_id = 5)

b) Run the following to get any errors in WIP_TXN_INTERFACE_ERRORS for transactions given by query (a) and upload in excel.

select *
  from WIP_TXN_INTERFACE_ERRORS WTIE
where WTIE.transaction_id in (
  select wcti.transaction_id
  from wip_cost_txn_interface wcti
 where process_status = 3
   and exists (  select 'x'
                from mtl_material_transactions mmt
 where mmt.transaction_action_id in (30,31)
   and mmt.costed_flag = 'N'
   and wcti.wip_entity_id = mmt.transaction_source_id
   and mmt.transaction_source_type_id = 5))


3. Check if there was any records stuck in MMTT? Run

    select *
   from mtl_material_Transactions_temp;

   Must return 0 rows, if it doesn't work with Inventory support/dev to have
   MMTT rows to be processed do NOT delete them.

   a) Run the following and upload in excel.
      This SQL will give all the completion transactions which have pending
      transactions in mtl_material_transactions_temp or wip_move_txn_interface

select *
from mtl_material_transactions mmt
where mmt.transaction_action_id in (31,30)
and transaction_source_type_id = 5
and exists (
                                   SELECT null
                                  FROM mtl_material_transactions_temp MMTP
                                  WHERE MMT.organization_id =MMTP.organization_id
                                    AND (MMT.COMPLETION_TRANSACTION_ID =
                                         MMTP.COMPLETION_TRANSACTION_ID
                                         OR MMT.MOVE_TRANSACTION_ID =
                                         MMTP.move_transaction_id)
                                    UNION ALL
                                      SELECT null
                                       FROM wip_move_txn_interface WMTI
                                      WHERE WMTI.TRANSACTION_ID =
                                            MMT.MOVE_TRANSACTION_ID)
and costed_flag = 'N'

b) Run the following and upload in excel.
Please take the corrective action import these pending transactions from mtl_material_transactions_temp to
mtl_material_transactions by running inventory transaction processor.
If these are in error then please take corrective actions.

select *
 FROM mtl_material_transactions_temp MMTP
where exists ( select 'x'
                from mtl_material_transactions mmt
 where mmt.transaction_action_id in (30,31)
  and mmt.transaction_source_type_id = 5
  and mmt.costed_flag = 'N'
  and MMT.organization_id = MMTP.organization_id
                 AND (MMT.COMPLETION_TRANSACTION_ID =
                      MMTP.COMPLETION_TRANSACTION_ID
                      OR MMT.MOVE_TRANSACTION_ID =
                         MMTP.move_transaction_id))


4. Check if there was any stuck WMTI? Run
   select *
   from wip_move_txn_interface;

   Must return 0 rows, if it doesn't work with WIP support/dev to have WMTI
   rows to be processed do NOT delete them.
   Please take the corrective action import these pending transactions from wip_move_txn_interface to
   wip_move_transactions by running wip move transaction processor.
   If these are in error then please take corrective actions.

select *
 FROM wip_move_txn_interface WMTI
where exists (  select 'x'
                from mtl_material_transactions mmt
 where mmt.transaction_action_id in (30,31)
   and mmt.transaction_source_type_id = 5
   and mmt.costed_flag = 'N'
   and WMTI.TRANSACTION_ID =
                      MMT.MOVE_TRANSACTION_ID )


5. Check if there are any orphaned Logical transactions?

Query:
SELECT mmt_parent.transaction_id
FROM MTL_MATERIAL_TRANSACTIONS mmt_parent
WHERE mmt_parent.parent_transaction_id is not null
and mmt_parent.costed_flag is null
and mmt_parent.parent_transaction_id = mmt_parent.transaction_id
and exists ( select 'x'
from mtl_material_transactions mmt_child
where mmt_child.parent_transaction_id =
mmt_parent.parent_transaction_id
and mmt_child.costed_flag = 'N')

   This must return 0 rows, if it doesn't let us know!

6. checked if you have any orphaned backflush transaction?
a)
SELECT mmt.transaction_date txn_dte, mmt.transaction_id txn_id,
mmt.transaction_action_id action,
mmt.inventory_item_id item_id, mmt.primary_quantity p_qty,
mmt.subinventory_code subinv,
mmt.transaction_source_id src,
mmt.actual_cost ac, mmt.organization_id org_id,
mmt.currency_code curr_code,
mmt.acct_period_id
FROM mtl_material_transactions mmt
WHERE mmt.costed_flag IN ('N','E')
AND mmt.transaction_source_type_id = 5
AND mmt.transaction_action_id NOT IN (30,31,32)
AND mmt.flow_schedule = 'Y'
AND EXISTS (SELECT 1
FROM mtl_material_transactions mmt1
WHERE mmt1.organization_id = mmt.organization_id
AND mmt1.transaction_action_id IN (30,31,32)
AND mmt1.transaction_source_type_id = 5
AND mmt1.costed_flag IS NULL
AND mmt1.completion_transaction_id =
mmt.completion_transaction_id);

b)
SELECT *
FROM wip_cost_txn_interface wcti
WHERE entity_type = 4
AND NVL(transaction_type,-1) IN (1,2,3)
AND EXISTS
(SELECT 1
FROM mtl_material_transactions mmt1
WHERE mmt1.organization_id = wcti.organization_id
AND mmt1.transaction_action_id IN (30,31,32)
AND mmt1.transaction_source_type_id = 5
AND mmt1.costed_flag IS NULL
AND mmt1.completion_transaction_id =
wcti.completion_transaction_id)

Both cases 4 and 5 can happen when there is a server or databsae crash which
leaves half posted data.

7. Check if there there are no transactions with costed_flag other than 'E','N' and null?
   Provide the output in Excel with headers of the following queries:

a)
select organization_id, costed_flag, count(*)
from mtl_material_Transactions
where costed_flag is not null
group by organization_id, costed_flag

b.)
Select organization_id, process_status, count(*)
from wip_cost_txn_interface
group by organization_id, process_status

 8. For R12.x
    Check if there is any stuck records in CST_LC_ADJ_INTERFACE (CLAI)table ? 

    Make sure there are no records stuck with error in CST_LC_ADJ_INTERFACE table.
    More information about the error should be in CST_LC_ADJ_INTERFACE_ERRORS table run:

    select  ce.error_message,ce.error_column, c.*  
    from    cst_lc_adj_interface c, org_acct_periods o,cst_lc_adj_interface_errors ce 
    where   c.organization_id = &org_id 
    and     c.transaction_id = ce.transaction_id 
    and     c.transaction_date <= o.schedule_close_date 
    and     c.organization_id = o.organization_id  
    and     o.acct_period_id = 6020  
    and     rownum < 1000

    Try setting the records in CST_LC_ADJ_INTERFACE to Process = 1 and Phase = 1 (Pending), 
    the Cost Managed spawned the Landed Cost Adjustment Processor and a Landed Cost Adjustment Worker.

    update CST_LC_ADJ_INTERFACE 
    set process_status = 1, 
    process_phase=1 
    where rcv_transaction_id = &rcv_txn_id;

    Run Landed Cost Adujustment Processor
    Check records, should not be there.
    select * 
    from CST_LC_ADJ_INTERFACE 
    where rcv_transaction_id = &rcv_txn_id;

9. Stop the cost manager, let all workers finish, then Enable MRP:DEBUG as
   YES and enable the trace on the cost manager, then launch the cost manager,
   Let it run for 1 hour and then stop it again, let all the workers finish
   once more, then provide us :

   a) the trace and tkprof of the cost manager
   b) the log file of the cost manager, note you can only obtain the log of the
   Cost Manager when the cost manager is stopped.

10. For R12:  supply the output of the collector Diagnostics script test name "Cost processing errors for 
    Inventory and WIP Transactions& To Check Uncosted Transactions At Period End"  (see Note 1271813.1)

11. For R12 : Run, review, and upload CSTPNTXN Period Close Pending Transactions Report output (from Doc ID 1331647.1)

12. Review the paper 'Resolving Period Close Pending Transaction' from Note 242927.1 
      Note 1069492.1  Also review Note 304313.1


+++++++++++ (Doc ID 748704.1)++++++++++


How To Find All Scheduled Requests Or List Of Requests in a Particular Status?

-- chkreqs.sql

set timing off 

column id format 9999999 heading 'Request' 
column phase heading 'Phase' 
column status format A9 heading 'Status' 
column pname format A40 heading 'Program name' 
column rpname format A32 heading 'Program name' 
column sd format A18 heading 'Start date' 
column submitd format A18 heading 'Submitted on' 
column requestd format A18 heading 'Requested start' 
column numreqs format 99999999 heading 'Number' 
column ra format A9 heading 'Run alone' 
column phase format A18 heading 'Phase' 
column pphase format A7 heading 'Phase' 
column schedt format A25 
column schedcnt format 99999 


prompt 
prompt ============================ 
prompt FND_CONCURRENT_REQUESTS totals 
prompt ============================ 

SELECT decode(phase_code, 'P', 'Pending requests', 
'R', 'Running requests', 
'C', 'Completed requests', 
phase_code) phase, count(*) numreqs 
FROM fnd_concurrent_requests 
GROUP BY phase_code; 



prompt 
prompt ============================
prompt Running requests: 
prompt ============================

SELECT request_id id, 
nvl(meaning, 'UNKNOWN') status, 
user_concurrent_program_name rpname, 
to_char(actual_start_date, 'DD-MON-RR HH24:MI:SS') sd, 
decode(run_alone_flag, 'Y', 'Yes', 'No') ra 
FROM fnd_concurrent_requests fcr, 
fnd_lookups fl, 
fnd_concurrent_programs_vl fcpv 
WHERE phase_code = 'R' 
AND LOOKUP_TYPE = 'CP_STATUS_CODE' 
AND lookup_code = status_code 
AND fcr.concurrent_program_id = fcpv.concurrent_program_id 
AND fcr.program_application_id = fcpv.application_id 
ORDER BY actual_start_date, request_id; 


prompt 
prompt ============================ 
prompt Pending request totals 
prompt ============================ 

prompt 
prompt Total Pending requests (by status code): 
prompt ----------------------------------------------- 

SELECT 'Pending' pphase, 
meaning status, 
count(*) numreqs 
FROM fnd_concurrent_requests, 
fnd_lookups 
WHERE LOOKUP_TYPE = 'CP_STATUS_CODE' 
AND lookup_code = status_code 
AND phase_code = 'P' 
GROUP BY meaning; 

prompt 
prompt Total scheduled requests: 
prompt ----------------------------------------------- 


set heading off 
set feedback off 

select 'Scheduled requests:' schedt, count(*) schedcnt 
from fnd_concurrent_requests 
WHERE (requested_start_date > sysdate OR 
status_code = 'P') 
AND phase_code = 'P'; 

select 'Non-scheduled requests:' schedt, count(*) schedcnt 
from fnd_concurrent_requests 
WHERE requested_start_date <= sysdate 
AND status_code != 'P' 
AND phase_code = 'P'; 


prompt 
prompt 
prompt Total requests on hold: 
prompt ----------------------------------------------- 

select 'Requests on hold:' schedt, count(*) schedcnt 
from fnd_concurrent_requests 
WHERE hold_flag = 'Y' 
AND phase_code = 'P'; 

select 'Not on hold:' schedt, count(*) schedcnt 
from fnd_concurrent_requests 
WHERE hold_flag != 'Y' 
AND phase_code = 'P'; 


set heading on 
set feedback on 


prompt 
prompt 
prompt 
prompt ============================ 
prompt Listing scheduled requests: 
prompt ============================

SELECT request_id id, 
nvl(meaning, 'UNKNOWN') status, 
user_concurrent_program_name pname, 
to_char(request_date, 'DD-MON-RR HH24:MI:SS') submitd, 
to_char(requested_start_date, 'DD-MON-RR HH24:MI:SS') requestd 
FROM fnd_concurrent_requests fcr, 
fnd_lookups fl, 
fnd_concurrent_programs_vl fcpv 
WHERE phase_code = 'P' 
AND (fcr.requested_start_date >= sysdate OR 
status_code = 'P') 
AND LOOKUP_TYPE = 'CP_STATUS_CODE' 
AND lookup_code = status_code 
AND fcr.concurrent_program_id = fcpv.concurrent_program_id 
AND fcr.program_application_id = fcpv.application_id 
ORDER BY request_date, request_id; 

prompt 

prompt ============================ 
prompt Listing pending requests (on hold): 
prompt ============================

SELECT request_id id, 
nvl(meaning, 'UNKNOWN') status, 
user_concurrent_program_name pname, 
to_char(request_date, 'DD-MON-RR HH24:MI:SS') submitd 
FROM fnd_concurrent_requests fcr, 
fnd_lookups fl, 
fnd_concurrent_programs_vl fcpv 
WHERE phase_code = 'P' 
AND hold_flag = 'Y' 
AND fcr.requested_start_date <= sysdate 
AND status_code != 'P' 
AND LOOKUP_TYPE = 'CP_STATUS_CODE' 
AND lookup_code = status_code 
AND fcr.concurrent_program_id = fcpv.concurrent_program_id 
AND fcr.program_application_id = fcpv.application_id 
ORDER BY request_date, request_id; 


prompt 
prompt ============================ 
prompt Listing pending requests (Not on hold): 
prompt ============================ 

SELECT request_id id, 
nvl(meaning, 'UNKNOWN') status, 
user_concurrent_program_name pname, 
to_char(request_date, 'DD-MON-RR HH24:MI:SS') submitd 
FROM fnd_concurrent_requests fcr, 
fnd_lookups fl, 
fnd_concurrent_programs_vl fcpv 
WHERE phase_code = 'P' 
AND hold_flag = 'N' 
AND fcr.requested_start_date <= sysdate 
AND status_code != 'P' 
AND LOOKUP_TYPE = 'CP_STATUS_CODE' 
AND lookup_code = status_code 
AND fcr.concurrent_program_id = fcpv.concurrent_program_id 
AND fcr.program_application_id = fcpv.application_id 
ORDER BY request_date, request_id; 

++++++++++++++++++++++++++++++++++++++
(Doc ID 554380.1)

Friday, September 13, 2013

Summary of Possible Reasons and Solutions for the Problem Where All Concurrent Requests Stuck in Pending Phase (Doc ID 182154.1)

Below are several different possible solutions to the problem where concurrent requests are stuck in pending status:

1.  When shutting down the concurrent managers are there any FNDLIBR processes still running at the OS level?   If so, do a kill -9 on them,
then restart the concurrent managers.

2.  Try Relinking $FND_TOP.

3.  Rebuild the concurrent manager views.  As applmgr run the following from the OS:

This is non-destructive.
Concurrent Manager views can be rebuilt by running the following command at the command line:
Ensure that concurrent managers are shutdown.

FNDLIBR FND FNDCPBWV apps/apps SYSADMIN 'System Administrator' SYSADMIN

Restart the concurrent managers.

4.  The Profile Option 'Concurrent: OPS Request Partitioning' may be set incorrectly. This profile option should always be set to
OFF, regardless of whether you are running OPS(RAC) or not, because the profile is obsolete.

5.  The System Profile Option: Concurrent Active Requests is possibly to 0.
        a.  Log into Oracle Applications as SYSADMIN.
        b.  Select System Administrator responsibility.
        c.  Navigate to PROFILE > SYSTEM.
        d.  Query for %CONC%ACTIVE%.
        e.  Change the profile option for 'Concurrent: Active Request Limit' to Null (blank).
        f.  Exit Oracle Applications and log in again for the change to take affect.
        g.  Run a new concurrent request.

6.  The Concurrent managers were brought down, while an outstanding request was still running in the background.  In which case, update the
FND_CONCURRENT_REQUESTS table as follows:

sql> update fnd_concurrent_requests
set status_code='X', phase_code='C'
where status_code='T';
sql> commit;

7.   The control_code for concurrent_queue_name = 'FNDCRM' is 'N' in the FND_CONCURRENT_QUEUES table,  which means 'Target node/queue unavailable'.
This value should be NULL (CRM is running; target and actual process amount are the same), or 'A' ('Activate concurrent manager' control status).
Set the control_code to 'A' in fnd_concurrent_queues for the Conflict Resolution Manager:
       a.  Logon to Oracle Applications database server as 'applmgr'.
       b.  Verify the Applications environment is setup correctly ($ORACLE_HOME and $ORACLE_SID).
       c.  Logon to SQL*Plus as 'APPS' and run the following SQL statement:
            update fnd_concurrent_queues
            set control_code = 'A'
            where concurrent_queue_name = 'FNDCRM';
            commit;
       d.  Verify the status of the concurrent managers through the  Concurrent -> Manager -> Administer form. 

If the CRM is still not active, bounce (deactivate, activate) the Internal Concurrent Manager.  This is done through the Concurrent > Manager >  Administer form
from the 'System Administrator' responsibility. It can also be done through the CONCSUB command at the command level.      

Setting the control_code to 'A' in the fnd_concurrent_queues table for the Conflict Resolution Manager indicates that this concurrent manager
is to be activated with the parameter values specified through this table for this manager (MAX_PROCESSES, CACHE_SIZE, etc).

8.  What is the cache size?   Try increasing the cache size then stop/restart the concurrent managers.
If concurrent requests are rarely prioritized and there are managers that service short-running requests, consider setting the cache size to
equal at least twice the number of target processes.  This increases the throughput of the concurrent managers by attempting to avoid any sleep time. 
For example:
If more than one manager or worker processes the same type of requests with only a small cache size, it may be unable to process any jobs in a
single processing cycle, because other processes have already run the cached requests.
When this happens, it is important to note that the manager will sleep before refreshing its cache.  To increase manager throughput where there
are sufficient requests of the required type in the queue, increase the cache size to improve the chance of the manager finding work to process
and thus avoid having to enter a sleep phase.

TIP: Ensure that the system is not resource-constrained before attempting to increase the rate of concurrent processing in this way, otherwise,

these changes may actually reduce concurrent processing throughput because jobs take longer to run.
+++++++++++Manjunatha++++++++++
 (Doc ID 153111.1)
+++++++++++Manjunatha+++++++++++

All Concurrent Requests Go Into Pending with Status of Standby

CAUSE :

System Profile Option: Concurrent Active Requests set to 0.

SOLUTION :

To fix the issue, lease do this:

  1. Log into Oracle Applications as SYSADMIN.
  2. Select System Administrator responsibility.
  3. Navigate to PROFILE --> SYSTEM.
  4. Query for %CONC%ACTIVE%.
  5. Change the profile option for Concurrent: Active Request Limit to Null (blank).
  6. Exit Oracle Applications and log in again for the change to take affect.
  7. Run a new concurrent request.                                                                            ++++++++++++++++++