The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT fou.oracle_username into OracleUserFND
FROM fnd_oracle_userid fou,
fnd_product_installations fpi,
fnd_application a
WHERE fou.oracle_id = fpi.oracle_id
AND fpi.application_id = a.application_id
AND a.application_short_name = 'FND' ;
SELECT fou.oracle_username into OracleUserJTF
FROM fnd_oracle_userid fou,
fnd_product_installations fpi,
fnd_application a
WHERE fou.oracle_id = fpi.oracle_id
AND fpi.application_id = a.application_id
AND a.application_short_name = 'JTF' ;
Delete From fnd_Concurrent_Queue_Size
where concurrent_queue_id in
(Select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in (2,6));
Delete from fnd_concurrent_queue_size
where concurrent_queue_id in
(select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in
( select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS')));
Delete From fnd_Concurrent_Queues_tl
where concurrent_queue_id in
(Select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in (2,6));
Delete from fnd_concurrent_queues_tl
where concurrent_queue_id in
(select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in
(select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS')));
Delete from fnd_concurrent_queues
where manager_type in (2,6);
Delete from fnd_concurrent_queues
where manager_type in
(select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS'));
Delete from fnd_concurrent_processes;
Delete from fnd_nodes;
execute immediate 'delete from fnd_conflicts_domain fcd ' ||
' where dynamic = ''Y''' ||
' and not exists (select ''X''' ||
' from fnd_concurrent_requests fcr ' ||
' where fcr.cd_id = fcd.cd_id ' ||
' and phase_code in (''P'', ''R''))';
Update fnd_concurrent_queues
set diagnostic_level = null,
target_node = null, max_processes = 0,
running_processes = 0;
Update fnd_concurrent_queues
set control_code = NULL
where control_code not in ('E', 'R', 'X')
and control_code IS NOT NULL;
* DELETE all PRINTER Profile option values other than 'noprint'
*/
-- Delete all PRITNER Profile option values other than 'noprint'
Delete from fnd_profile_option_values
where profile_option_value <> 'noprint'
and profile_option_id =
(select profile_option_id
from fnd_profile_options
where profile_option_name = 'PRINTER');
Delete from fnd_printer
where printer_name <> 'noprint';
Delete from fnd_printer_tl
where printer_name <> 'noprint';
Update fnd_concurrent_programs
set printer_name = null,
enable_trace = 'N'
where printer_name is not null or enable_trace = 'Y';
Delete from fnd_concurrent_requests
where phase_code in ('C', 'R');
Delete from fnd_concurrent_requests
where phase_code = 'P'
and (PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID) in
(select application_id, concurrent_program_id
from fnd_concurrent_programs
where execution_method_code = 'P');
Delete From fnd_Concurrent_Queue_Size
where concurrent_queue_id in
(Select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in (2,6));
Delete from fnd_concurrent_queue_size
where concurrent_queue_id in
(select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in
( select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS')));
Delete From fnd_Concurrent_Queues_tl
where concurrent_queue_id in
(Select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in (2,6));
Delete from fnd_concurrent_queues_tl
where concurrent_queue_id in
(select concurrent_queue_id
from fnd_concurrent_queues
where manager_type in
(select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS')));
Delete from fnd_concurrent_queues
where manager_type in (2,6);
Delete from fnd_concurrent_queues
where manager_type in
(select service_id
from fnd_cp_services
where upper(service_handle) in
('FORMSL', 'FORMSMS', 'FORMSMC',
'REPSERV', 'TCF', 'APACHE',
'JSERV', 'OAMGCS'));
Delete from fnd_nodes;