Tuesday, September 23, 2008

Disable streams processes

# stop apply

BEGIN
FOR cur_rec IN (SELECT apply_name FROM dba_apply) LOOP
DBMS_APPLY_ADM.STOP_APPLY(
apply_name => cur_rec.apply_name);
END;

# stop capture

BEGIN
FOR cur_rec IN (SELECT capture_name FROM dba_capture) LOOP
DBMS_CAPTURE_ADM.STOP_CAPTURE(
capture_name => cur_rec.capture_name);
END;

# stop propagate
BEGIN
DBMS_AQADM.DISABLE_PROPAGATION_SCHEDULE(
queue_name => 'strmadm.queue_name',
destination => 'dest');
END;

SELECT propagation_name
FROM dba_propagation;

exec dbms_propagation_adm.stop_propagation('XXX');