CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle DBMS_CDC_SUBSCRIBE
Version 11.1
 
General Information
Purpose Public interface for the Change Data Capture Subscriber
Source {ORACLE_HOME}/rdbms/admin/dbmscdcs.sql
First Available 9.0.1
Dependencies
CDC_CHANGE_SETS$ DBMS_CDC_SUBSCRIBE
CHANGE_SETS DBMS_CDC_UTILITY
DBA_SUBSCRIBED_TABLES DBMS_LOGMNR_CDC_SUBSCRIBE
DBA_SUBSCRIPTIONS DBMS_SYS_ERROR
DBMS_ASSERT DBMS_UTILITY
DBMS_CDC_ISUBSCRIBE WRH$_STREAMS_POOL_ADVICE

Exceptions
Exception Description
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
Object Privileges GRANT execute ON dbms_cdc_subscribe TO <schema_name>;
GRANT execute ON dbms_cdc_subscribe TO uwclass;
 
ACTIVATE_SUBSCRIPTION
Indicates that a subscription is ready to start accessing change data

10g subscriber interface
dbms_cdc_subscribe.activate_subscription(subscription_name IN VARCHAR2);
See Streams Demo 2
9i subscriber interface dbms_cdc_subscribe.activate_subscription(subscription_handle IN NUMBER);
Deprecated
 
CREATE_SUBSCRIPTION
Creates a subscription that is associated with one change set

10g subscriber interface
dbms_cdc_subscribe.create_subscription(
change_set_name   IN VARCHAR2,
description       IN VARCHAR2,
subscription_name IN VARCHAR2);
See Streams Demo 2
 
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

10g subscriber interface
dbms_cdc_subscribe.drop_subscription(subscription_name IN VARCHAR2);
See Streams Demo 2
9i subscriber interface dbms_cdc_subscribe.drop_subscription(subscription_handle IN NUMBER);
Deprecated
 
EXTEND_WINDOW (new 11g parameter)
Sets the subscription window high boundary so that new change data can be seen

10g subscriber interface
dbms_cdc_subscribe.extend_window(
subscription_name IN VARCHAR2,
upper_bound       IN DATE DEFAULT NULL);
See Streams Demo 2
9i subscriber interface  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 (new 11g parameter)
Sets the low boundary of the subscription window so that the subscription no longer sees any change data, effectively making the subscription window empty

10g subscriber interface
dbms_cdc_subscribe.purge_window(
subscription_name IN VARCHAR2,
lower_bound       IN DATE DEFAULT NULL);
See Streams Demo 2
9i subscriber interface 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

10g 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 Streams Demo 2
10g 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 dbms_cdc_subscribe.subscribe(
subscription_handle IN NUMBER,
source_schema       IN VARCHAR2,
source_table        IN VARCHAR2,
column_list         IN VARCHAR2);
Deprecated
9i subscriber interface dbms_cdc_subscribe.subscribe(
subscription_handle IN NUMBER,
publication_id      IN NUMBER,
column_list         IN VARCHAR2);
Deprecated
 
Related Topics
Advanced Queuing
DBMS_CDC_PUBLISH
DBMS_CDC_UTILITY
DBMS_STREAMS
DBMS_STREAMS_ADM
DBMS_STREAMS_AUTH
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [210 users online]    © 2010 psoug.org