Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
This chapter describes how to use the DBMS_LOGMNR_CDC_SUBSCRIBE
package to view and query the change data that was captured and published with the DBMS_LOGMNR_CDC_PUBLISH
package.
A Change Data Capture system usually has one publisher that captures and publishes changes for any number of Oracle source (relational) tables and many subscribers. The subscribers, typically applications, use the Oracle supplied package, DBMS_LOGMNR_CDC_SUBSCRIBE
, to access the published data.
This chapter discusses the following topics:
Oracle9i Data Warehousing Guide for more information about the Oracle Change Data Capture publish and subscribe model.
See Also:
Once the publisher sets up the system to capture data into change tables and grants access, subscribers can access and query the published change data for any of the source tables of interest. Using the procedures in the DBMS_LOGMNR_CDC_SUBSCRIBE
package, the subscriber accomplishes the following main objectives:
SELECT
statements to retrieve change data from the subscriber views.
The primary role of the subscriber is to use the change data. Through the DBMS_LOGMNR_CDC_SUBSCRIBE
package, each subscriber registers interest in a set of source tables by subscribing to them.
Table 26-1 describes the procedures for the DBMS_LOGMNR_CDC_SUBSCRIBE
package.
Subscribers call the procedures in the order shown in Table 26-1 unless an error occurs, at which time the subscribers should exit. Figure 26-1 shows the most common steps for using the procedures in the DBMS_LOGMNR_CDC_SUBSCRIBE
package.
In Figure 26-1:
PURGE_WINDOW
procedure immediately after using an EXTEND_WINDOW
procedure, then change data is lost without ever being processed.
EXTEND_WINDOW
procedure immediately after using the DROP_SUBSCRIBER_VIEW
procedure, you will see the data that you just processed again and possibly some new data.
DBMS_LOGMNR_CDC_SUBSCRIBE
procedures should detect the error and exit. For example, if the PREPARE_SUBSCRIBER_VIEW
procedure fails for any reason, and the application ignores the error and continues, then the PURGE_WINDOW
procedure will delete data that was never seen or selected by the subscriber.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|