The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
distinct
a.snapshot_log_sql,
a.FAST_REFRESH_FLAG,
a.object_name
from
bis_obj_properties a,
bis_obj_dependency e
where a.object_name=e.depend_object_name
and a.object_type=e.depend_object_type
and a.object_name=p_object_name
and a.object_type=p_object_type
and a.SNAPSHOT_LOG_SQL is not null;
select 'Y'
from dual
where exists (SELECT LOG_TABLE
from all_snapshot_logs
where master = p_master
AND log_owner IN (SELECT oracle_username
FROM fnd_oracle_userid
WHERE oracle_id BETWEEN 900 AND 999
AND read_only_flag = 'U'))
OR exists (SELECT logs.LOG_TABLE
from all_snapshot_logs logs, user_synonyms s
where logs.master = s.table_name
AND logs.log_owner = s.table_owner
AND s.synonym_name = p_master);
SELECT MVIEW_NAME, OWNER
FROM all_mviews
WHERE MVIEW_NAME=p_object_name
AND owner IN (SELECT oracle_username
FROM fnd_oracle_userid
WHERE oracle_id BETWEEN 900 AND 999
AND read_only_flag = 'U')
UNION ALL
SELECT mview_name, owner
FROM all_mviews mvs, user_synonyms s
WHERE mvs.owner = s.table_owner
AND mvs.mview_name = s.table_name
AND mvs.mview_name = p_object_name;
l_sql:='update bis_obj_properties set full_refresh_complete=''Y'' where object_name='||''''||p_object_name||''''||' and object_type='||''''||p_object_type||'''';
write_log('Updated full_refresh_complete flag to ''Y''');
select
distinct
a.object_name,
a.object_type
from
bis_obj_prog_linkages a,
fnd_concurrent_programs b,
fnd_request_set_programs c,
fnd_request_sets d,
fnd_application e
where
a.CONC_APP_ID=b.application_id
and a.CONC_PROGRAM_NAME=b.CONCURRENT_PROGRAM_NAME
and b.APPLICATION_ID=c.PROGRAM_APPLICATION_ID
and b.CONCURRENT_PROGRAM_ID=c.CONCURRENT_PROGRAM_ID
and c.SET_APPLICATION_ID=d.application_id
and c.REQUEST_SET_ID=d.REQUEST_SET_ID
and d.REQUEST_SET_NAME=p_set_name
and d.application_id=e.application_id
and e.application_short_name=p_set_app;
l_sql:='update bis_obj_properties set full_refresh_complete=''N'' where object_name='||''''||l_object_rec.object_name||''''||' and object_type='||''''||l_object_rec.object_type||'''';
write_log('updated full_refresh_complete for '||l_object_rec.object_name);