DBMS_REFRESH: Managing Snapshot Groups

The DBMS_REFRESH package contains procedures for administrating snapshot groups. A snapshot group is a collection of one or more snapshots that Oracle refreshes in an atomic transaction, guaranteeing that relationships among the master tables are preserved in the snapshot tables. The DBMS_REFRESH package includes packages that perform the following functions:

  • Create and destroy snapshot groups

  • Add and subtract snapshots from snapshot groups

  • Manually refresh snapshot groups

  • Change properties of the snapshot group, such as the refresh interval

Figure Figure 14.1 shows how DBMS_REFRESH works and Figure Figure 14.2 illustrates snapshot groups.

DBMS_REFRESH components

Figure 14-1. DBMS_REFRESH components

A snapshot group

Figure 14-2. A snapshot group

Getting Started with DBMS_REFRESH

The DBMS_REFRESH package is created when the Oracle database is installed. The dbmssnap.sql script (found in the built-in packages source directory, as described in Chapter 1) contains the source code for this package’s specification. This script is called by catproc.sql, which is normally run immediately after database creation. The script creates the public synonym DBMS_REFRESH for the package and grants EXECUTE privilege on the package to public. All Oracle users can reference and make use of this package.

Table 14-3 ...

Get Oracle Built-in Packages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.