The following lines contain the word 'select', 'insert', 'update' or 'delete':
insert into fnd_adg_control values l_rec;
select a.*
into l_adg_control_rec
from fnd_adg_control a
where a.control_key = C_CONTROL_KEY;
select a.*
into l_adg_control_rec
from fnd_adg_control a
where a.control_key = C_CONTROL_KEY;
-- Updates always disable cache
disable_control_cache;
select a.*
into l_adg_control_rec
from fnd_adg_control a
where a.control_key = C_CONTROL_KEY
for update of a.control_key;
cursor c1 is select a.service_name
from v$session a
where a.sid = ( select distinct b.sid from v$mystat b);
cursor c1 is select b.pid,b.spid,a.audsid,a.process
from v$session a,v$process b
where a.sid = ( select distinct c.sid from v$mystat c)
and a.paddr = b.addr;
insert into fnd_adg_simulated_stndby_trc
(
log_seq ,
ORACLE_PROCESS_ID ,
OS_PROCESS_ID ,
ORACLE_SESSION_ID ,
REQUEST_ID ,
magic_switch_enabled ,
read_only_violations ,
trace_file_name ,
trace_access_error
)
values
(
fnd_adg_simulated_stndby_trc_s.nextval,
f_rec.spid,
substr(f_rec.process,1,50),
f_rec.audsid,
p_request_id,
p_magic_switch_enabled,
p_adg_violations ,
p_trace_file,
p_trace_error
);
insert into fnd_adg_control values l_rec;
procedure update_adg_control(p_adg_control_rec fnd_adg_control%rowtype,
p_commit boolean default true)
as
begin
update fnd_adg_control a
set row = p_adg_control_rec
where a.control_key = C_CONTROL_KEY;
update_adg_control(l_rec,false);
execute immediate 'select 1 from dual@' || p_link_name
into l_rc;
select a.sid,a.serial#
into l_sid,l_serial
from v$session a
where a.sid = ( select distinct b.sid from v$mystat b);
'select a.sid,a.serial#,a.service_name ' ||
' from v$session@'||p_link_name|| ' a' ||
' where a.sid = ' ||
' ( select distinct b.sid from v$mystat@'||p_link_name||' b)'
into l_rpc_sid,l_rpc_serial,l_rpc_service_name;
select a.dbid,a.name
into l_dbid,l_dbname
from v$database a;
'select a.dbid,a.name,a.open_mode,a.database_role ' ||
' from v$database@'||p_link_name|| ' a'
into l_rpc_dbid,l_rpc_dbname,l_rpc_open_mode,l_rpc_database_role;
'select a.client_info ' ||
' from v$session@'||p_link_name|| ' a' ||
' where a.sid = ' || l_sid ||
' and a.serial# = ' || l_serial
into l_rpc_client_info;
select DIRECTORY_PATH
into l_directory_path
from all_directories
where DIRECTORY_NAME=l_rec.simulated_stndby_trc_dir_obj
and owner= 'SYS';
'select b.tracefile ' ||
' from v$session a,v$process b ' ||
' where a.sid = ( select distinct c.sid from v$mystat c) ' ||
' and a.paddr = b.addr'
into l_tracefile;
cursor c1 is select a.status,a.object_name
from dba_objects a
where a.owner = user
and a.object_name in
( C_ERROR_TRIGGER,C_LOGON_TRIGGER,C_LOGOFF_TRIGGER )
and a.object_type = 'TRIGGER';
delete from fnd_adg_commit_wait;
delete from fnd_adg_simulated_stndby_trc;
delete from fnd_adg_concurrent_program;
cursor c1 is select a.owner,a.DB_LINK,upper(a.host) host
from all_db_links a
where a.owner = upper(p_link_owner)
and a.DB_LINK = upper(p_link_name);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
select count(*)
into l_dir_obj_ok
from all_directories
where DIRECTORY_NAME=p_trace_directory_obj
and owner= 'SYS';
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
update_adg_control(l_rec);
cursor c1 is select a.QUEUE_APPLICATION_ID,a.CONCURRENT_QUEUE_ID,
a.TYPE_APPLICATION_ID,a.type_id,
a.include_flag,a.type_code,
b.Max_Processes,b.Running_Processes
from FND_CONCURRENT_QUEUE_CONTENT a,fnd_concurrent_queues b
where a.QUEUE_APPLICATION_ID = b.Application_Id
and a.CONCURRENT_QUEUE_ID = b.concurrent_queue_id
and a.type_code = 'R'
and a.include_flag = 'I'
and a.TYPE_APPLICATION_ID = p_req_class_app_id
and a.type_id = p_req_class_id;
delete from fnd_adg_commit_wait a
where a.session_id < userenv('SESSIONID')
and not exists
( select 1
from gv$session b
where b.audsid = a.session_id
);