The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT oracle_username
FROM fnd_oracle_userid WHERE oracle_id
BETWEEN 900 AND 999 AND read_only_flag = 'U';
select NVL(compile_state, 'NA')
from all_mviews
where mview_name = p_mvname
AND owner = p_apps_schema_name
UNION ALL
SELECT NVL(compile_state, 'NA')
FROM all_mviews mvs, user_synonyms s
WHERE mvs.owner = s.table_owner
AND mvs.mview_name = s.table_name
AND mview_name = p_mvname;
select CUSTOM_API from bis_obj_properties
where object_name = p_mvname;
select distinct
sets.request_set_name,
opt.option_value
from
fnd_run_requests req,
fnd_request_sets sets,
bis_request_set_options opt
where
req.parent_request_id = p_request_id
and sets.request_set_id = req.request_set_id
and sets.application_id = req.set_application_id
/* remove the following predicates for the assumptin on
* application id = 191 might not be true*/
--and req.application_id = 191
--and sets.application_id = 191
--and req.application_id = sets.application_id
and opt.request_set_name = sets.request_set_name
and opt.option_name = 'FORCE_FULL';
select version into db_versn from v$instance;
select substr(replace(substr(version,1,instr(version,'.',1,2)-1),'.'),1,2)
into db_versn from v$instance;
SELECT count(*) INTO l_count FROM ALL_MVIEWS
WHERE OWNER = g_apps_schema_name AND MVIEW_NAME = p_mvname;
SELECT FAST_REFRESHABLE, REFRESH_METHOD
INTO l_fast_refreshable, l_refresh_method
FROM ALL_MVIEWS
WHERE OWNER = g_apps_schema_name AND MVIEW_NAME = p_mvname;
l_retcode = -32314 OR -- "REFRESH FAST of \"%s\".\"%s\" unsupported after deletes/updates"
l_retcode = -32315 OR -- "REFRESH FAST of \"%s\".\"%s\" unsupported after mixed DML and Direct Load"
l_retcode = -32316 OR -- "REFRESH FAST of \"%s\".\"%s\" unsupported after mixed DML"
l_retcode = -32320 OR -- "REFRESH FAST of \"%s\".\"%s\" unsupported after cointainer table PMOPs"
l_retcode = -32321 -- "REFRESH FAST of \"%s\".\"%s\" unsupported after detail table TRUNCATE"
--l_retcode = -23413 -- table OWNER.TABLE_NAME does not have a materialized view log
) THEN
BIS_COLLECTION_UTILITIES.put_line('Ignored the following error while fast-refreshing '|| p_mvname || ':');
select distinct object_name, function_id
from bis_obj_dependency, fnd_form_functions
where depend_object_type = 'MV'
and object_type = 'PORTLET'
and function_name(+) = depend_object_name
and depend_object_name = P_MVNAME;
select distinct object_name
from bis_obj_dependency
where depend_object_type = 'MV'
and object_type = 'PORTLET'
and depend_object_name = P_MVNAME;
select NVL( implementation_flag, 'N')
from bis_obj_properties
where object_type = 'MV'
and object_name = P_MVNAME;
execute immediate ' select name from all_registered_mviews where owner=:1 and mview_id=:2' into l_mv_name using get_apps_schema_name,p_mview_id;
execute immediate 'select vname from sys.snap$ where snapid=:1' into l_mv_name using p_mview_id;
select ''Dissociated ''
from dual
where not exists
(
select ''Y''
from all_registered_mviews a,
all_base_table_mviews b
where a.name=:1
and a.owner=:2
and a.mview_id=b.mview_id
and b.master=:3
and b.owner=:4)
';
select ''Y''
from dual
where not exists
(
select ''Y''
from
all_base_table_mviews
where owner=:1
and master=:2
and mview_id<>:3 )
';
select a.priority_request_id
from fnd_concurrent_requests a
where a.request_id =
(select b.parent_request_id from fnd_concurrent_requests b where b.request_id=p_prog_request_id );
procedure insert_into_history(p_mv_name varchar2,p_prog_req_id number)
is
l_root_req_id number;
BIS_COLL_RS_HISTORY.insert_program_object_data
(
x_request_id => p_prog_req_id,
x_stage_req_id => null,
x_object_name => p_mv_name ,
x_object_type => 'MV',
x_refresh_type => 'CONSIDER_REFRESH',
x_set_request_id =>l_root_req_id );
logmsg('Error happened in BIS_COLL_RS_HISTORY.insert_program_object_data: '||sqlerrm);
SELECT OBJECT_NAME from BIS_OBJ_PROPERTIES where OBJECT_TYPE = 'MV';
select
distinct
c.object_name mview_name
from
all_objects c
where c.object_name=mvNameFromBOP
and c.owner=g_apps_schema_name
and c.object_type='MATERIALIZED VIEW'
and c.status='INVALID';
select
distinct
l.log_table log_table,
l.log_owner log_owner,
l.master master_name
from
bis_obj_properties a,
all_mviews b,
all_mview_refresh_times t,
all_mview_logs l
where a.object_type=''MV''
and nvl(a.implementation_flag,''N'')=''N''
and a.object_name=b.mview_name
and b.owner=:1
and b.mview_name=t.name
and b.owner=t.owner
and t.master=l.master
and t.master_owner=l.log_owner
order by l.log_owner,l.log_table
';
select distinct mview_id
from all_base_table_mviews
where owner=:1
and master=:2'
;
select ''Y''
from dual
where not exists
(select mview_id
from all_registered_mviews
where mview_id=:1
and owner=:2)
OR not exists
(select snapid
from sys.snap$
where snapid =:3
and master=:4
and mowner=:5) '
;
select distinct a.name
from all_registered_mviews a,
all_dependencies b
where a.mview_id=:1
and a.owner=:2
and a.name=b.name
and a.owner=b.owner
and b.type=''MATERIALIZED VIEW''
and b.REFERENCED_OWNER=:3
and b.REFERENCED_NAME=:4'
;
select distinct a.name
from all_registered_mviews a,
all_mview_refresh_times b
where a.mview_id=:1
and a.owner=:2
and a.name=b.name
and a.owner=b.owner
and b.master_owner=:3
and b.master=:4'
;
select nvl(b.implementation_flag,''N'') impl_flag
from
bis_obj_properties b
where b.object_name =:1
and b.object_type=''MV'''
;
execute immediate 'select count(*) from '|| l_log_owner||'.'||l_log_table into l_row_count;
insert_into_history(l_mview_name,l_prog_req_id);
select
distinct
t.name,
t.owner,
t.last_refresh
from
all_mview_refresh_times t,
all_mview_logs l
where t.master=l.master
and t.master_owner=l.log_owner
and l.log_table=:1
and l.log_owner=:2
order by t.name,t.owner,t.last_refresh
';
select
distinct
l.log_table log_table,
l.log_owner log_owner,
l.master master_name
from
bis_obj_properties a,
all_mviews b,
all_mview_refresh_times t,
all_mview_logs l
where a.object_type=''MV''
and nvl(a.implementation_flag,''N'')=''N''
and a.object_name=b.mview_name
and b.owner=:1
and b.mview_name=t.name
and b.owner=t.owner
and t.master=l.master
and t.master_owner=l.log_owner
order by l.log_owner,l.log_table
';
select distinct a.mview_id
from all_base_table_mviews a,
all_snapshot_logs b
where a.owner=:1
and a.master=b.master
and a.owner=b.LOG_OWNER
and b.log_table=:2'
;
BIS_COLL_RS_HISTORY.insert_program_object_data
(
x_request_id => prog_request_id,
x_stage_req_id => null,
x_object_name => P_MVNAME ,
x_object_type => 'MV',
x_refresh_type => l_mv_refresh_type,
x_set_request_id => FND_GLOBAL.CONC_PRIORITY_REQUEST);
BIS_COLL_RS_HISTORY.insert_program_object_data(x_request_id => p_request_id,
x_stage_req_id => null,
x_object_name => p_object_name ,
x_object_type => 'MV',
x_refresh_type => p_refresh_type,
x_set_request_id => p_set_request_id);