The following lines contain the word 'select', 'insert', 'update' or 'delete':
insert into fnd_concurrent_debug_info
(
session_id, user_id, login_id,
time, function, action, message,
resp_appl_id, responsibility_id,
security_group_id, transaction_id,
program_application_id, concurrent_program_id,
concurrent_queue_id, time_in_number, source_type
)
values
(
sid, fnd_global.user_id, fnd_global.login_id,
sysdate, function_name, substr(action_cnt || '|' || action_name, 1, 30),
substr(message_text, 1, ARGMAX),
fnd_global.resp_appl_id, fnd_global.resp_id,
fnd_global.security_group_id,request_id,
g_program_appl_id, g_program_id,
conc_queue_id, dbms_utility.get_time, s_type
);
insert into fnd_tm_events
(EVENT_TYPE, TIMESTAMP, TRANSACTION_ID,
PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID,
USER_ID, RESP_APPL_ID, RESPONSIBILITY_ID)
SELECT event_type, sysdate, request_id,
fcp.application_id, fcp.concurrent_program_id,
fnd_global.user_id, fnd_global.resp_appl_id, fnd_global.resp_id
from fnd_concurrent_programs fcp, fnd_application fa
where fcp.concurrent_program_name = program
and fcp.application_id = fa.application_id
and fa.application_short_name = application;
insert into fnd_tm_events
(EVENT_TYPE, TIMESTAMP, TRANSACTION_ID,
QUEUE_APPLICATION_ID, CONCURRENT_QUEUE_ID,
PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID,
USER_ID, RESP_APPL_ID, RESPONSIBILITY_ID,
RUNNING_PROCESSES, TARGET_PROCESSES)
SELECT event_type, sysdate, request_id,
FCQ.application_id, queue_id,
fcp.application_id, fcp.concurrent_program_id,
fnd_global.user_id, fnd_global.resp_appl_id, fnd_global.resp_id,
fcq.RUNNING_PROCESSES, fcq.max_processes
from fnd_concurrent_programs fcp,
fnd_concurrent_queues fcq,
fnd_application fa
where fcp.concurrent_program_name = program
and fcq.concurrent_queue_id = queue_id
and fcp.application_id = fa.application_id
and fa.application_short_name = application;
delete from fnd_tm_events
where transaction_id = request_id
and event_type = 2;
insert into fnd_tm_events
(EVENT_TYPE, TIMESTAMP, TRANSACTION_ID,
QUEUE_APPLICATION_ID, CONCURRENT_QUEUE_ID,
PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID,
USER_ID, RESP_APPL_ID, RESPONSIBILITY_ID,
RUNNING_PROCESSES, TARGET_PROCESSES)
SELECT
/*+ ORDERED USE_NL (fa fcp fr fcpp fcq)
INDEX (fcq,FND_CONCURRENT_QUEUES_N1)
INDEX (fcpp,FND_CONC_PROCESSOR_PROGRAMS_U2) */
3, sysdate, request_id,
FCQ.application_id, FCQ.concurrent_queue_id,
fcp.application_id, fcp.concurrent_program_id,
fnd_global.user_id, fnd_global.resp_appl_id, fnd_global.resp_id,
fcq.RUNNING_PROCESSES, fcq.max_processes
from fnd_application fa,
fnd_concurrent_programs fcp,
fnd_conc_processor_programs fcpp,
fnd_responsibility fr,
fnd_concurrent_queues fcq
where fcp.concurrent_program_name = program
and fcq.processor_application_id = fcpp.processor_application_id
and fcq.concurrent_processor_id = fcpp.concurrent_processor_id
and fcpp.concurrent_program_id = fcp.concurrent_program_id
and fcpp.program_application_id = fcp.application_id
and fcp.application_id = fa.application_id
and fa.application_short_name = application
and fr.responsibility_id = fnd_global.resp_id
and fr.application_id = fnd_global.resp_appl_id
and fr.data_group_id = fcq.data_group_id
and fcq.manager_type = '3';
SELECT fcp.application_id, fcp.concurrent_program_id
into temp_fcp_application_id, temp_fcp_concurrent_program_id
from fnd_concurrent_programs fcp
where fcp.concurrent_program_name = program
and fcp.application_id = (
SELECT application_id
from fnd_application
where application_short_name = application);
insert into fnd_tm_events
(EVENT_TYPE, TIMESTAMP, TRANSACTION_ID,
QUEUE_APPLICATION_ID, CONCURRENT_QUEUE_ID,
PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID,
USER_ID, RESP_APPL_ID, RESPONSIBILITY_ID,
RUNNING_PROCESSES, TARGET_PROCESSES, NUMDATA)
SELECT 4, sysdate, request_id,
FCQ.application_id, fcq.concurrent_queue_id,
temp_fcp_application_id, temp_fcp_concurrent_program_id,
fnd_global.user_id, fnd_global.resp_appl_id, fnd_global.resp_id,
fcq.RUNNING_PROCESSES, fcq.max_processes, timeout
from fnd_concurrent_queues fcq
where fcq.concurrent_queue_id = to_number(substr(tm_pipe,11));
insert into fnd_tm_events
(EVENT_TYPE, TIMESTAMP, TRANSACTION_ID,
PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID,
USER_ID, RESP_APPL_ID, RESPONSIBILITY_ID, NUMDATA)
SELECT event_type, sysdate, request_id,
fcp.application_id, fcp.concurrent_program_id,
fnd_global.user_id, fnd_global.resp_appl_id, fnd_global.resp_id, timeout
from fnd_concurrent_programs fcp, fnd_application fa
where fcp.concurrent_program_name = program
and fcp.application_id = fa.application_id
and fa.application_short_name = application;
select fnd_trn_request_id_s.nextval
into request_id
from dual;
select userenv('SESSIONID')
into sid
from sys.dual;
SELECT DECODE(P.ENABLE_TRACE, 'Y', 'Y', enable_trace_flag),
NVL(P.MULTI_ORG_CATEGORY, 'N'),
P.APPLICATION_ID, P.CONCURRENT_PROGRAM_ID
INTO enable_trace_flag, morg_cat,
g_program_appl_id, g_program_id
FROM FND_CONCURRENT_PROGRAMS P,
FND_APPLICATION A
where p.concurrent_program_name = program
and p.application_id = a.application_id
and a.application_short_name = application;
SELECT VALUE
into nls_date_lang
FROM V$NLS_PARAMETERS
Where PARAMETER = 'NLS_DATE_LANGUAGE';
SELECT VALUE
into nls_num_chars
FROM V$NLS_PARAMETERS
Where PARAMETER = 'NLS_NUMERIC_CHARACTERS';
select nvl(mo_global.get_access_mode, morg_cat) into org_type from dual;
select nvl(mo_global.get_current_org_id, 0) into org_id from dual;