The following lines contain the word 'select', 'insert', 'update' or 'delete':
select version
into g_db_version
from v$instance
where rownum = 1;
' SELECT read_only_flag'||
' FROM FND_ORACLE_USERID u'||
' WHERE oracle_username = upper(:b)'
INTO l_read_only_flag USING X_schema_name;
INSERT INTO AD_GENERIC_TEMP(line_sequence, contents)
VALUES (g_seq_no, substr(X_msg, i, MAX_LOGSTR_SIZE));
select column_name, data_type, data_type_owner
from dba_tab_columns
where owner = X_table_owner
and table_name = X_table_name;
select column_name, data_type, data_type_owner
from dba_tab_columns
where owner = X_from_schema
and table_name = X_table_name
and (data_type in ('LONG', 'LONG RAW')
or
(data_type_owner is not null
and
data_type_owner not in ('SYSTEM', 'MDSYS', X_from_schema)));
select 'x'
into l_type_exists
from dba_types
where type_name = X_type_name
and owner = X_type_owner;
select column_name, data_type, data_type_owner, data_length,
data_precision, data_scale, nullable
from dba_tab_columns
where owner = X_from_schema
and table_name = X_table_name
order by column_id;
SELECT spec.timestamp, temporary
INTO l_spec_table_timestamp, l_temporary
FROM DBA_OBJECTS spec
WHERE spec.OWNER = X_to_schema
AND spec.OBJECT_NAME = X_table_name
AND spec.OBJECT_TYPE = 'TABLE';
SELECT src.timestamp, nvl(l_temporary, temporary)
INTO l_source_table_timestamp, l_temporary
FROM DBA_OBJECTS src
WHERE src.OWNER = X_from_schema
AND src.OBJECT_NAME = X_table_name
AND src.OBJECT_TYPE = 'TABLE';
'GRANT SELECT ON '||
X_from_schema||'.'||X_table_name||
' TO '|| X_to_schema|| ' WITH GRANT OPTION');
l_stmt := ' INSERT INTO '||X_to_schema||'.'||X_table_name||
'('|| l_col_list||') '||
' SELECT '||l_col_list||
' FROM '||X_from_schema||'.'||X_table_name||
' WHERE rownum = 1 '||
' AND NOT EXISTS ( '||
' SELECT null'||
' FROM '||X_to_schema||'.'||X_table_name||
' WHERE rownum = 1)';
select text
from dba_source
where owner = X_source_schema
and name = X_name
and type = X_type
order by line;
select synonym_name, table_name, table_owner
from dba_synonyms
where owner = X_apps_schema
and synonym_name = 'AD_PREPMODE_CHECK_FILES';
select object_type, object_name
bulk collect into spec_obj_type_tab, spec_obj_name_tab
from dba_objects
where owner = X_spec_schema
and object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and object_type not in ('INDEX', 'LOB INDEX', 'LOB');
select object_type, object_name
bulk collect into clone_obj_type_tab, clone_obj_name_tab
from dba_objects
where owner = X_clone_schema
and object_type not in ('INDEX', 'LOB INDEX', 'LOB')
and object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
order by decode(object_type, 'PACKAGE', 1, 'VIEW', 2,
3);
select count(*)
into l_obj_count
from dba_objects
where owner = X_clone_schema
and object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL');
l_stmt := 'select status, message '||
'from sys.dbms_upg_status$ s '||
'where source_schema = :X_source_schema '||
'and target_schema = :x_target_schema '||
'and ( status like ''CLONE%'' or '||
' status like ''SWAP%'') '||
'order by sequence# desc';
select synonym_name, table_name, table_owner
from dba_synonyms src
where src.owner = X_source_schema
and src.synonym_name in (
select cl.synonym_name
from dba_synonyms cl
where cl.owner = X_clone_schema
and cl.table_owner = X_spec_schema);