Tuesday, September 14, 2010

PCP

To disable PCP

Capture required information before updating rows.
Sample Output
sqlplus apps
select NODE_NAME ,count(*) from FND_CONCURRENT_QUEUES
group by NODE_NAME
order by NODE_NAME;

NODE_NAME COUNT(*)
------------------------------ ----------
a 2
b 9
c 4
d 41
2

select NODE_NAME2,count(*) from FND_CONCURRENT_QUEUES
group by NODE_NAME2 order by NODE_NAME2;

NODE_NAME2 COUNT(*)
------------------------------ ----------
c 15
d 4
39

select TARGET_NODE,count(*) from FND_CONCURRENT_QUEUES
group by TARGET_NODE
order by TARGET_NODE;

TARGET_NODE COUNT(*)
------------------------------ ----------
58

Execute below DML statements as apps user
create table FND_CONCURRENT_QUEUES_BKP as select * from FND_CONCURRENT_QUEUES;

update fnd_concurrent_queues
set node_name='z'
where node_name in ('c','d');

45 rows updated.

Commit;

update fnd_concurrent_queues
set target_node='z'
where CONCURRENT_QUEUE_NAME not like '%QUEUE2%'
and MAX_PROCESSES >0

14 rows updated.
update fnd_concurrent_queues
set NODE_NAME2=''
where NODE_NAME2 in ('c','d');

19 rows updated.

Commit;

Disable all Concurrent queues ending with ""- Queue 2""

update FND_CONCURRENT_QUEUES
set ENABLED_FLAG='N'
where CONCURRENT_QUEUE_NAME like '%QUEUE2%'

4 rows updated.
Commit;"

No comments: