The following lines contain the word 'select', 'insert', 'update' or 'delete':
update FND_CONCURRENT_PROCESSES
set PROCESS_STATUS_CODE = 'S',
LAST_UPDATE_DATE = sysdate
where CONCURRENT_QUEUE_ID =
( select CONCURRENT_QUEUE_ID
from FND_CONCURRENT_QUEUES
where MANAGER_TYPE = '6'
and NODE_NAME = node)
and PROCESS_STATUS_CODE not in ('S', 'K');
update FND_CONCURRENT_QUEUES
set running_processes = 0,
max_processes = 0,
control_code = null
where MANAGER_TYPE = '6'
and NODE_NAME = node;
update FND_CONCURRENT_PROCESSES
set PROCESS_STATUS_CODE = 'K',
LAST_UPDATE_DATE = sysdate
where CONCURRENT_QUEUE_ID =
( select CONCURRENT_QUEUE_ID
from FND_CONCURRENT_QUEUES
where MANAGER_TYPE = '6'
and NODE_NAME = node)
and PROCESS_STATUS_CODE not in ('S', 'K');
update FND_CONCURRENT_QUEUES
set running_processes = 0,
max_processes = 0,
control_code = null
where MANAGER_TYPE = 6
and NODE_NAME = node;
update FND_CONCURRENT_PROCESSES
set PROCESS_STATUS_CODE = 'S',
LAST_UPDATE_DATE = sysdate
where MANAGER_TYPE = 6
and PROCESS_STATUS_CODE not in ('S', 'K');
update FND_CONCURRENT_QUEUES
set running_processes = 0,
max_processes = 0,
control_code = null
where MANAGER_TYPE = '6';
/* 5867853- register_fndsm_fcp is used by ICM to insert FNDSM row, then FNDSM
is spawned and uses register_fndsm_db to update the row. This procedure
should be an autonomous transaction with a commit so that it is instantly
available to FNDSM for update. */
procedure register_fndsm_fcp( cpid IN number,
node IN varchar2,
ospid IN number,
logfile IN varchar2,
mgrusrid IN number,
twotask IN varchar2)
is
PRAGMA AUTONOMOUS_TRANSACTION;
update FND_CONCURRENT_PROCESSES
set PROCESS_STATUS_CODE = 'K',
LAST_UPDATE_DATE = sysdate,
LAST_UPDATED_BY = mgrusrid
where PROCESS_STATUS_CODE not in ('S','K')
and MANAGER_TYPE = 6
and NODE_NAME = node;
update FND_CONCURRENT_QUEUES
set running_processes = 1,
max_processes = 1,
control_code = null
where MANAGER_TYPE = 6 and NODE_NAME = node;
INSERT INTO FND_CONCURRENT_PROCESSES
(CONCURRENT_PROCESS_ID, ORACLE_PROCESS_ID,
QUEUE_APPLICATION_ID, CONCURRENT_QUEUE_ID,
SESSION_ID,
Creation_Date, Created_By,
LAST_UPDATE_DATE, LAST_UPDATED_BY,
PROCESS_START_DATE, PROCESS_STATUS_CODE,
MANAGER_TYPE, OS_PROCESS_ID,
LOGFILE_NAME,
NODE_NAME, SQLNET_STRING)
(select
cpid, '999999',
Q.APPLICATION_ID, Q.CONCURRENT_QUEUE_ID,
'999999',
sysdate, mgrusrid,
SYSDATE, mgrusrid,
SYSDATE, 'A',
6, ospid,
logfile,
node, twotask
from FND_CONCURRENT_QUEUES Q
where Q.MANAGER_TYPE = 6
and Q.NODE_NAME = node
);
select count(*)
into qcount
from fnd_concurrent_queues
where node_name = node
and manager_type = '6';
select count(*)
into ncount
from fnd_concurrent_queues
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name);
select fnd_concurrent_queues_s.nextval
into dummy
from dual;
delete from fnd_concurrent_queues_tl
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name)
AND application_id = (SELECT application_id FROM fnd_application WHERE application_short_name = 'FND');
select count(*)
into qcount
from fnd_concurrent_queues
where manager_type = '2'
and node_name = node;
select count(*)
into ncount
from fnd_concurrent_queues
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name);
select fnd_concurrent_queues_s.nextval
into dummy
from dual;
delete from fnd_concurrent_queues_tl
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name)
AND application_id = (SELECT application_id FROM fnd_application WHERE application_short_name = 'FND');
select count(*)
into qcount
from fnd_concurrent_queues
where node_name = node
and TO_NUMBER(manager_type) = (select service_id
from fnd_cp_services where service_handle='OAMGCS');
select count(*)
into ncount
from fnd_concurrent_queues
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name);
select fnd_concurrent_queues_s.nextval
into dummy
from dual;
delete from fnd_concurrent_queues_tl
where upper(CONCURRENT_QUEUE_NAME) = upper(mgr_name)
AND application_id = (SELECT application_id FROM fnd_application WHERE application_short_name = 'FND');
select instance_number
into insnum
from v$instance;
select instance_name
into dbinstname
from v$instance;
select value
into dbname
from v$parameter
where name = 'db_name';
select value
into dbdomain
from v$parameter
where name = 'db_domain';
select userenv('SESSIONID')
into audsid
from dual;
select p.pid
into opid
from v$process p, v$session s
where s.audsid = userenv('SESSIONID')
and p.addr = s.paddr;
select node_name
into nodename
from fnd_concurrent_processes
where concurrent_process_id = cpid;
update fnd_concurrent_processes
set oracle_process_id = opid,
session_id = audsid,
db_name = dbname,
db_domain = dbdomain,
db_instance = dbinstname,
sqlnet_string = instance,
instance_number = insnum
where os_process_id = ospid
and process_status_code = 'A'
and node_name = nodename;
procedure insert_service_fcp( cmpid IN number,
qapid IN number,
qid IN number,
mgrusrid IN number,
mgrtype IN varchar2,
node IN varchar2)
is
PRAGMA AUTONOMOUS_TRANSACTION;
INSERT INTO FND_CONCURRENT_PROCESSES
(CONCURRENT_PROCESS_ID, ORACLE_PROCESS_ID,
QUEUE_APPLICATION_ID, CONCURRENT_QUEUE_ID,
OS_PROCESS_ID, SESSION_ID,
Creation_Date, Created_By,
LAST_UPDATE_DATE, LAST_UPDATED_BY,
PROCESS_START_DATE, PROCESS_STATUS_CODE,
MANAGER_TYPE, NODE_NAME,
Lk_Handle)
VALUES
(cmpid, '999999',
qapid, qid,
'999999', '999999',
Sysdate, mgrusrid,
SYSDATE, mgrusrid,
SYSDATE, 'Z',
mgrtype, upper(node),
'SERVICE');
end insert_service_fcp;