The following lines contain the word 'select', 'insert', 'update' or 'delete':
select /*+ ORDERED */
u.name owner, o.name object_name,
decode(o.type#, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE', '??')
object_type
from fnd_oracle_userid fou, sys.user$ u, sys.obj$ o, sys.procedure$ p
where fou.read_only_flag = 'U'
and fou.install_group_num = 1
and u.name = fou.oracle_username
and o.owner# = u.user#
and o.type# in (7, 8, 9)
and o.name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and o.obj# = p.obj#
and bitand(p.options, 16) <> 16;
select /*+ FULL(o), ORDERED */
u.name owner, o.name object_name,
decode(o.type#, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE', '??')
object_type
from sys.obj$ o, ad_timestamps t, fnd_oracle_userid fou, sys.user$ u,
sys.procedure$ p
where fou.read_only_flag = 'U'
and fou.install_group_num = 1
and u.name = fou.oracle_username
and o.owner# = u.user#
and o.type# in (7, 8, 9)
and o.name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and o.obj# = p.obj#
and bitand(p.options, 16) <> 16
and t.type = 'Invoker Maintenance'
and t.attribute = 'Last Run'
and o.mtime >= t.timestamp;
select do.owner, do.object_name, do.object_type, u.oracle_username
from dba_objects do, fnd_oracle_userid u
where do.owner =
(select o.oracle_username
from fnd_oracle_userid o
where o.read_only_flag = 'U'
and o.install_group_num = 1)
and do.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION',
'JAVA CLASS')
and do.object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and u.read_only_flag = 'U'
and u.install_group_num > 1;
select do.owner, do.object_name, do.object_type, u.oracle_username
from dba_objects do, fnd_oracle_userid u, ad_timestamps t
where do.owner =
(select o.oracle_username
from fnd_oracle_userid o
where o.read_only_flag = 'U'
and o.install_group_num = 1)
and do.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION',
'JAVA CLASS')
and do.object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and u.read_only_flag = 'U'
and u.install_group_num > 1
and t.type = 'Invoker Maintenance'
and t.attribute = 'Last Run'
and do.last_ddl_time >= t.timestamp;
select do.owner, do.object_name, do.object_type
from dba_objects do
where do.owner = upper(c_apps_schema)
and do.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION',
'JAVA CLASS')
and do.object_name not in ('APPS_DDL', 'APPS_ARRAY_DDL')
and do.object_name not like 'FFP%';
insert into ad_invoker_tasks (
phase, owner, name, type, other_schema,
worker, done_flag, authid_flag, invoker_flag, boundary_flag)
values (
1, c1.owner, c1.object_name, c1.object_type, c1.owner,
0, 'N', null, null, 'N');
insert into ad_invoker_tasks (
phase, owner, name, type, other_schema,
worker, done_flag, authid_flag, invoker_flag, boundary_flag)
values (
1, c1.owner, c1.object_name, c1.object_type, c1.owner,
0, 'N', null, null, 'N');
'insert into ad_invoker_tasks ('||
'phase, owner, name, type, other_schema,'||
'worker, done_flag, authid_flag, invoker_flag, boundary_flag)'||
'values ('||
'2, ''Boundary'', ''Boundary'', ''Boundary'', to_char(:wrk_num),'||
':wrk_num, ''N'', null, null, ''Y'')';
insert into ad_invoker_tasks (
phase, owner, name, type, other_schema,
worker, done_flag, authid_flag, invoker_flag, boundary_flag)
values (
3, c1.owner, c1.object_name, c1.object_type, c1.oracle_username,
0, 'N', 'X', 'X', 'N');
insert into ad_invoker_tasks (
phase, owner, name, type, other_schema,
worker, done_flag, authid_flag, invoker_flag, boundary_flag)
values (
3, c1.owner, c1.object_name, c1.object_type, c1.oracle_username,
0, 'N', 'X', 'X', 'N');
update_timestamp('Invoker Maintenance','Last Run');
select rowid, owner, name, type
from ad_invoker_tasks
where phase = 3
and type not like 'JAVA%'
and worker = calculate_grant_types.worker_num;
update ad_invoker_tasks
set authid_flag = 'N',
invoker_flag = null
where rowid = c1.rowid;
update ad_invoker_tasks
set authid_flag = 'Y',
invoker_flag = calculate_grant_types.invoker_flag
where rowid = c1.rowid;
select rowid
from ad_invoker_tasks
where phase = phase_num;
update ad_invoker_tasks
set worker = counter
where rowid = the_rec.rowid;
update ad_invoker_tasks
set worker = counter
where rowid = the_rec.rowid;
select count(*)
from ad_invoker_tasks
where phase in (1, 3);
select oracle_username
from fnd_oracle_userid
where read_only_flag = 'U';
procedure update_done
(what_row in rowid)
--
-- Sets AD_INVOKER_TASKS.DONE_FLAG to 'Y' for this particular row.
-- Commits the changes using an autonomous transaction
--
is
PRAGMA AUTONOMOUS_TRANSACTION;
update ad_invoker_tasks
set done_flag = 'Y'
where rowid = what_row;
ad_apps_private.error_buf := 'update_done('||
what_row||'): '||
ad_apps_private.error_buf;
end update_done;
select rowid the_row_id
from ad_invoker_tasks
where phase = 1
and worker = worker_number;
select owner, name, type, other_schema, done_flag
from ad_invoker_tasks
where rowid = c_row_id;
update_done(rows_to_process(row_index));
select text from dba_source
where owner = upper(rewrite_a_package.owner)
and name = upper(rewrite_a_package.name)
and type = upper(rewrite_a_package.type)
order by line;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Object type "'||upper(type)||'" not supported.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE MESSAGE',
upper(type)||' '||upper(owner)||'.'||upper(name)||
' contains AUTHID - Not rewritten'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE MESSAGE',
upper(type)||' '||upper(owner)||'.'||upper(name)||
' contains line(s) > 255 chars - Not rewritten'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
' has no IS/AS keyword - Not rewritten'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
' has IS/AS keyword on long line - Not rewritten'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR - A',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Generic error occurred.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR - B',
substr(upper(type)||' '||upper(owner)||'.'||upper(name)||
': '||sql_error,1,1996)
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'1 REWRITE ERROR - C',
substr(upper(type)||' '||upper(owner)||'.'||upper(name)||
': '||ad_apps_private.error_buf,1,1996)
from sys.dual;
select rowid, owner, name, type, other_schema,
authid_flag, invoker_flag, done_flag
from ad_invoker_tasks
where phase = 3
and worker = worker_number;
update_done(c1_rec.rowid);
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Object type "'||upper(type)||'" not supported.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Invalid value for invoker_flag: "'||invoker_flag||'"'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Invalid value for authid_flag: "'||authid_flag||'"'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Internal error [pkg]'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Internal error [classification]'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - A',
upper(type)||' '||upper(owner)||'.'||upper(name)||
': Generic error occurred.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - B',
substr(upper(type)||' '||upper(owner)||'.'||upper(name)||
': '||sql_error,1,1996)
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - C',
substr(upper(type)||' '||upper(owner)||'.'||upper(name)||
': '||ad_apps_private.error_buf,1,1996)
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR',
upper(type)||' '||upper(owner)||'.'||name||
': Object type "'||upper(type)||'" not supported.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - A',
upper(type)||' '||upper(owner)||'.'||name||
': Generic error occurred.'
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - B',
substr(upper(type)||' '||upper(owner)||'.'||name||
': '||sql_error,1,1996)
from sys.dual;
insert into ad_parallel_compile_errors (
owner, worker_number, timestamp, type, text)
select upper(owner),
0,
timestamp,
'3 GRANT ERROR - C',
substr(upper(type)||' '||upper(owner)||'.'||name||
': '||ad_apps_private.error_buf,1,1996)
from sys.dual;
procedure update_timestamp
(in_type in varchar2,
in_attribute in varchar2)
is
begin
update_timestamp
(in_type => in_type,
in_attribute => in_attribute,
in_timestamp => sysdate);
procedure update_timestamp
(in_type in varchar2,
in_attribute in varchar2,
in_timestamp in date)
--
-- Updates/Inserts the row in AD_TIMESTAMPS for the specified
-- type and attribute
--
is
begin
--
-- First try to update
--
update ad_timestamps
set timestamp = in_timestamp
where type = in_type
and attribute = in_attribute;
insert into ad_timestamps
(type, attribute, timestamp)
values (in_type, in_attribute, in_timestamp);
ad_apps_private.error_buf := 'update_timestamp('
|| in_type ||', '|| in_attribute ||', '||
to_char(in_timestamp,'YYYY-MM-DD:HH24:MI:SS') ||'): '||
ad_apps_private.error_buf;
end update_timestamp;
select text from dba_source
where owner = upper(classify_plsql_object.owner)
and name = upper(classify_plsql_object.name)
and type = upper(classify_plsql_object.type)
order by line;
select
substr(s.text, instr(s.text,'$Header'||': '),
((instr(s.text,' $', instr(s.text,'$Header'||': ')) + 2)
- instr(s.text,'$Header'||': ')))
from dba_source s
where s.owner= upper(c_owner)
and s.name = upper(c_name)
and s.type = upper(c_type)
and s.line between 2 and 5
and s.text like '%$Header'||': % $%';