Oracle DBMS_CDC_SUBSCRIBE
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Public interface for the Change Data Capture Subscriber
AUTHID DEFINER
Dependencies
CDC_CHANGE_SETS$ DBA_SUBSCRIPTIONS DBMS_LOGMNR_CDC_SUBSCRIBE
CHANGE_SETS DBMS_CDC_ISUBSCRIBE DBMS_STANDARD
DBA_SUBSCRIBED_TABLES    
Documented Yes
Exceptions
Error Code Reason
ORA-31409 One or more values for input parameters are incorrect
ORA-31415 Specified change set does not exist
ORA-31425 Subscription does not exist
ORA-31426 Cannot modify active subscriptions
ORA-31427 Specified source table already subscribed
ORA-31428 No publication contains all the specified columns
ORA-31429 Subscription has not been activated
ORA-31432 Invalid source table
ORA-31449 Invalid value for change_set_name
ORA-31457 Maximum length of description field exceeded
ORA-31466 No publications found
ORA-31469 Cannot enable Change Data Capture for change set
ORA-31506 Duplicate subscription name specified
ORA-31509 Publication does not exist
ORA-31510 Name uses reserved prefix CDC$
ORA-31511 Name exceeds maximum length of 30 characters
ORA-31514 Change set disabled due to capture error
First Available 9.0.1
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmscdcs.sql
Subprograms
 
ACTIVATE_SUBSCRIPTION
Indicates that a subscription is ready to start accessing change data
10gR1+ subscriber interface
Overload 1
dbms_cdc_subscribe.activate_subscription(subscription_name IN VARCHAR2);
See CDC Demo 2 Linked Below
9i subscriber interface
Overload 2
dbms_cdc_subscribe.activate_subscription(subscription_handle IN NUMBER);
Deprecated
 
CREATE_SUBSCRIPTION
Creates a subscription that is associated with one change set

10gR1+ subscriber interface
dbms_cdc_subscribe.create_subscription(
change_set_name   IN VARCHAR2,
description       IN VARCHAR2,
subscription_name IN VARCHAR2);
See CDC Demo 2 Linked Below
 
DROP_SUBSCRIBER_VIEW
9i subscriber interface dbms_cdc_subscribe.drop_subscriber_view(
subscription_handle IN NUMBER,
source_schema       IN VARCHAR2,
source_table        IN VARCHAR2);
Deprecated
 
DROP_SUBSCRIPTION
Drops a subscription (10gR1 and above)
Overload 1
dbms_cdc_subscribe.drop_subscription(subscription_name IN VARCHAR2);
See CDC Demo 2 Linked Below
9i subscriber interface
Overload 2
dbms_cdc_subscribe.drop_subscription(subscription_handle IN NUMBER);
Deprecated
 
EXTEND_WINDOW
Sets the subscription window high boundary so that new change data can be seen
10gR1+ subscriber interface
Overload 1
dbms_cdc_subscribe.extend_window(
subscription_name IN VARCHAR2,
upper_bound       IN DATE DEFAULT NULL);
See CDC Demo 2 Linked Below
9i subscriber interface
Overload 2
dbms_cdc_subscribe.extend_window(subscription_handle IN NUMBER);
Deprecated
 
GET_SUBSCRIPTION_HANDLE
9i subscriber interface dbms_cdc_subscribe.get_subscription_handle(
change_set          IN  VARCHAR2,
description         IN  VARCHAR2,
subscription_handle OUT NUMBER);
Deprecated
 
PREPARE_SUBSCRIBER_VIEW
9i subscriber interface dbms_cdc_subscribe.prepare_subscriber_view(
subscription_handle IN  NUMBER,
source_schema       IN  VARCHAR2,
source_table        IN  VARCHAR2,
view_name           OUT VARCHAR2);
Deprecated
 
PURGE_WINDOW
Sets the low boundary of the subscription window so that the subscription no longer sees any change data, effectively making the subscription window empty. This is a 10gR1+ subscriber interface.
Overload 1
dbms_cdc_subscribe.purge_window(
subscription_name IN VARCHAR2,
lower_bound       IN DATE DEFAULT NULL);
See CDC Demo 2 Linked Below
9i subscriber interface
Overload 2
dbms_cdc_subscribe.purge_window(subscription_handle IN NUMBER);
Deprecated
 
SUBSCRIBE
Specifies a source table and the source columns for which the subscriber wants to access change data
10gR1+ subscriber interface

Overload 1
dbms_cdc_subscribe.subscribe(
subscription_name IN VARCHAR2,
source_schema     IN VARCHAR2,
source_table      IN VARCHAR2,
column_list       IN VARCHAR2,
subscriber_view   IN VARCHAR2);
See CDC Demo 2 Linked Below
10gR1+ subscriber interface

Overload 2
dbms_cdc_subscribe.subscribe(
subscription_name IN VARCHAR2,
publication_id    IN NUMBER,
column_list       IN VARCHAR2,
subscriber_view   IN VARCHAR2);
Deprecated
9i subscriber interface

Overload 3
dbms_cdc_subscribe.subscribe(
subscription_handle IN NUMBER,
source_schema       IN VARCHAR2,
source_table        IN VARCHAR2,
column_list         IN VARCHAR2);
Deprecated
9i subscriber interface

Overload 4
dbms_cdc_subscribe.subscribe(
subscription_handle IN NUMBER,
publication_id      IN NUMBER,
column_list         IN VARCHAR2);
Deprecated

Related Topics
Advanced Queuing
Change Data Capture Demo 1
Change Data Capture Demo 2
Change Data Capture Demo 3
DBMS_CDC_EXPVDP
DBMS_CDC_IMPDPV
DBMS_CDC_PUBLISH
DBMS_CDC_UTILITY
DBMS_STREAMS
DBMS_STREAMS_ADM
DBMS_STREAMS_AUTH
Packages
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved