The following lines contain the word 'select', 'insert', 'update' or 'delete':
/* Private -- inserts info in FND_CONCURRENT_DEBUG_INFO */
procedure debug_fnd_dcp (fn in varchar2,
msg in varchar2,
txn in number default NULL) is
pragma AUTONOMOUS_TRANSACTION;
select user_id into userid from user_users;
insert into fnd_concurrent_debug_info
(SESSION_ID, USER_ID, LOGIN_ID, FUNCTION, TIME, ACTION, MESSAGE)
values
(userenv('SESSIONID'), userid, fnd_global.login_id, fn,
sysdate, 'TXN NO '|| nvl(to_char(txn),'NULL'), msg);
select concurrent_process_id,
node_name,
logfile_name,
db_instance
into cpid,
node,
logf,
inst
from fnd_concurrent_processes
where concurrent_process_id in (
select max (concurrent_process_id)
from fnd_concurrent_processes
where queue_application_id = 0
and concurrent_queue_id = 1
and process_status_code in ('A', 'M', 'K'));
select nvl (sleep_seconds, DEFSLEEP)
into ti
from fnd_concurrent_queues
where application_id = apid
and concurrent_queue_id = qid;
select concurrent_process_id,
(sysdate - last_update_date) * DAY
into cpid,
td
from fnd_concurrent_processes
where concurrent_process_id in (
select max (concurrent_process_id)
from fnd_concurrent_processes
where queue_application_id = apid
and concurrent_queue_id = qid
and process_status_code in (
psc1, psc2, psc3, psc4))
for update nowait;
select 1 into dummy
from fnd_concurrent_processes
where concurrent_process_id = cpid
for update nowait;
update fnd_concurrent_processes
set process_status_code = decode (process_status_code,
'A', 'K',
'M', 'S',
process_status_code)
where concurrent_process_id = cpid;
select max_processes,
running_processes,
control_code,
target_node
into max_procs,
run_procs,
ccode,
tnode
from fnd_concurrent_queues
where application_id = apid
and concurrent_queue_id = qid;
select queue_application_id,
concurrent_queue_id,
concurrent_process_id,
rowid
from fnd_concurrent_processes
where manager_type between 1 and 5
and process_status_code in ('A', 'C')
order by concurrent_process_id;
update fnd_concurrent_processes
set lk_handle = hndl
where rowid = rid;
* The table fnd_concurrent_queues may be updated.
*
* Assumptions:
* This function assumes that the node names stored in
* fnd_concurrent_queues exactly match those in the manager's
* sysinfo structure. (i.e. Both fully qualified, or both not
* fully qualified)
*
* Error conditions:
*
* All other exceptions are unhandled.
*/
function get_inst_num (queue_appl_id in number,
queue_id in number,
current_node in varchar2)
return number is
primary_node fnd_concurrent_queues.node_name%type;
select upper(node_name), upper(node_name2)
into primary_node, secondary_node
from fnd_concurrent_queues
where concurrent_queue_id = queue_id
and application_id = queue_appl_id;
select instance_number
into inst_num
from v$instance;
update fnd_concurrent_queues
set instance_number = inst_num
where application_id = queue_appl_id
and concurrent_queue_id = queue_id;
/* Update the global */
FND_CONC_GLOBAL.Override_OPS_INST_NUM(inst_num);
select INSTANCE_NUMBER
into inst_num
from fnd_concurrent_queues
where application_id = queue_appl_id
and concurrent_queue_id = queue_id;
/* Update the global...if not null */
if (inst_num is not null) then
FND_CONC_GLOBAL.Override_OPS_INST_NUM(inst_num);
select queue_application_id, concurrent_queue_id,
running_processes, max_processes,
decode(control_code,
'T','N', -- Abort
'X','N', -- Aborted
'D','N', -- Deactivate
'E','N', -- Deactivated
'Y') active,
target_node
from fnd_concurrent_worker_requests
where request_id = rid
and not((queue_application_id = 0)
and (concurrent_queue_id in (1,4)))
and not((queue_application_id = qappid)
and (concurrent_queue_id = qid ));
select node_name1
into req_node
from fnd_concurrent_requests
where request_id = req_id;
select target_node
into my_node
from fnd_concurrent_queues
where application_id = my_q_appl_id
and concurrent_queue_id = my_q_id;
select count(*)
into dummy
from fnd_nodes
where node_name = req_node
and (node_mode <> 'O'
or status <> 'Y');
select count(*)
into node_count
from fnd_nodes
where node_name <> 'AUTHENTICATION'
and support_cp = 'Y';