Refresh Groups
As in the previous example, often you need snapshots on a group of related tables, which may have interdependencies. If you refresh snapshots individually, the resulting data is not guaranteed to have a point-in-time consistency; in fact, it probably will not. For example, if we were to refresh the ORDER_ITEMS snapshot followed by the ORDERS table, we could end up with entries in ORDERS that have no corresponding entries in ORDER_ITEMS if users create orders while the ORDER_ITEMS table refreshes. Obviously, this is not an acceptable state of affairs.
Oracle uses theconcept of a refresh group to encapsulate snapshots that must have point-in-time consistency. You are guaranteed that all snapshots in a single refresh group will be refreshed with data from the master tables as of a single point in time. In addition, refresh groups provide ease of management because Oracle includes a variety of built-in procedures in the package DBMS_REFRESH for their maintenance. The following procedures manipulate refresh groups at the snapshot site:
- DBMS_REFRESH.ADD
Adds a snapshot to an existing group.
- DBMS_REFRESH. CHANGE
Modifies properties of a refresh group, such as refresh interval, next refresh time, and so on.
- DBMS_REFRESH.DESTROY
Drops a refresh group.
- DBMS_REFRESH. MAKE
Creates a refresh group.
- DBMS_REFRESH. SUBTRACT
Removes a snapshot from an existing refresh group.
The following sections provide brief examples of using these procedures; refer to Appendix A, for the complete API ...
Get Oracle Distributed Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.