Thursday 4 June 2020

Troubleshooting concurrent requests struck at Post processing Phase

Sometimes , Eventhough the Database sessions related to the concurrent Programs are in INACTIVE State , we could not terminate the Concurrent Request with error "Could not Lock Request" , Issue could be Requests are struck at Post Processing Phase and OutPut Post Processor is locking the Concurrent Requests.

Need to follow the below steps to perform clean shutdown of Oracle Concurrent Manager.

a) Put Pending Concurrent Requests on hold using the below sql queries.

+Create table apps.conc_req_on_hold as select * from fnd_Concurrent_requests where PHASE_CODE='P' and hold_flag='N';
+select count(*) from apps.conc_req_on_hold
+ update fnd_Concurrent_requests set hold_flag='Y' where PHASE_CODE='P' and hold_flag='N' and request_id in (select request_id from apps.conc_req_on_hold);

NOTE: You have to commit if select & update are same number of records. Otherwise rollback and try again till the numbers are same

+ Commit;

You can find more details about putting Pending Concurrent Jobs on Hold here.
http://www.appsdbadiaries.com/2016/01/concurrent-requests-on-hold.html




b)Bring Down Concurrent Manager using adcmctl.sh stop

c) Update the status of Struck Concurrent Requests to "Terminated" 

SQL> update fnd_concurrent_requests set status_code='X',phase_code='C' where status_code='R' and phase_code='R';

Commit;


Use Concurrent Manager Recovery Wizard from OAM to clear the database sessions associated with cancelled Requests.

d) Start Concurrent Manager using adcmctl.sh

e) Remove Hold on Concurrent Requests

SQL>update fnd_Concurrent_requests set hold_flag='N' where request_id in (select request_id from apps.conc_req_on_hold);

Commit the changes

 SQL>commit;

Steps to create Database link from Oracle Database to Microsoft SQLServer Database:

Steps to create Database link from Oracle Database to Microsoft SQLServer Database:

Pre-requisites

1. Check Network communication is Opened from Oracle Database Server to MSSQL Database Server using telnet
2. Download the Oracle Gateway Server Software same as your Oracle Database version.

Installation of Oracle Gateway Software
=========

Hope you have downloaded the Dg4msql software for sql server 

1> Create a directory as gateway under $ORACLE_BASE directory. 

2) Invoke the GUI , Select Oracle Gateway for MYSQL and enter the sql server details at the time of installation 

3) Before completing the installation, OUI invokes the NETCA and create a new listener for gateway with new port (ex:1526) 

Note; In case if you have defined any bash profile for TNS_ADMIN, then please comment it 

4. Follow the below note for pre-req for gateway listener 

How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) post install ( Doc ID 562509.1 ) 

edit your gateway listener as recommended in the above note. 

5. create a tnsentry in $ORACLE_HOME/network/admin 

6. export TNS_ADMIN=$gateway home/network/admin 

lsnrctl stop <gateway listener> 

lsnrctl start <gateway listener> 

tnsping <gateway alias> 

conn / as sysdba 

create public database link <test> connect to "<sql server user>" identified by "<password>" using '<tnsnames.ora>' 

select * from dual@test;