Manage the Capture Process in Oracle Stream

Start, Stop, Alter, Drop the Capture Process in Oracle Steam

Checkpoint Retention time is the time(in days) that a capture process retains checkpoints before purging them automatically.
DBA_REGISTERED_ARCHIVED_LOG view displays the FIRST_TIME and NEXT_TIME for archived redo log files.
DBA_CAPTURE view displays the required checkpoint SCN for a capture process.

START the CAPTURE procedure

BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(
capture_name => 'strm01_capture');
END;
/

 
STOP the CAPTURE procedure

BEGIN
DBMS_CAPTURE_ADM.STOP_CAPTURE(
capture_name => 'strm01_capture');
END;
/

 
Setting a Capture Process Parameter

BEGIN
DBMS_CAPTURE_ADM.SET_PARAMETER(
capture_name => 'strm01_capture',
parameter    => 'parallelism',
value        => '4');
END;
/

 
Setting the Capture User for a Capture Process

BEGIN
DBMS_CAPTURE_ADM.ALTER_CAPTURE(
capture_name => 'strm01_capture',
capture_user => 'hr');
END;
/

 
Setting the Checkpoint Retention Time for a Capture Process
Note:strm01_capture should purge checkpoints automatically every ten days and twelve hours:

BEGIN
DBMS_CAPTURE_ADM.ALTER_CAPTURE(
capture_name              => 'strm01_capture',
checkpoint_retention_time => 10.5);
END;
/

 
Setting the Checkpoint Retention Time for a Capture Process to Infinite

BEGIN
DBMS_CAPTURE_ADM.ALTER_CAPTURE(
capture_name              => 'strm01_capture',
checkpoint_retention_time => DBMS_CAPTURE_ADM.INFINITE);
END;
/

 
Check the Capture process:

SELECT CAPTURE_NAME, FIRST_SCN, APPLIED_SCN, REQUIRED_CHECKPOINT_SCN
FROM DBA_CAPTURE;

 
Setting the Start SCN for an Existing Capture Process:

BEGIN
DBMS_CAPTURE_ADM.ALTER_CAPTURE(
capture_name => 'strm01_capture',
start_scn    => 750338);
END;
/

Configured the DB Link for capture process

Create the database link to the source database. Ensure that the database link connects to the Oracle Streams administrator at the source database. For example:

CREATE DATABASE LINK dbs1.example.com CONNECT TO strmadmin
IDENTIFIED BY password
USING 'dbs1.example.com';

--Alter the capture process to use the database link. For example:

BEGIN
DBMS_CAPTURE_ADM.ALTER_CAPTURE(
capture_name       => 'strm05_capture',
use_database_link  => TRUE);
END;
/

 
Dropping a Capture Process

BEGIN
DBMS_CAPTURE_ADM.DROP_CAPTURE(
capture_name          => 'strm02_capture',
drop_unused_rule_sets => TRUE);
END;
/

 
Setting the Capture User for a Synchronous Capture

BEGIN
DBMS_CAPTURE_ADM.ALTER_SYNC_CAPTURE(
capture_name => 'sync_capture',
capture_user => 'hr');
END;
/

 
Dropping a Synchronous Capture

BEGIN
DBMS_CAPTURE_ADM.DROP_CAPTURE(
capture_name          => 'sync_capture',
drop_unused_rule_sets => TRUE);
END;
/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.