DBMS_REFERESH.MAKE( name => 'acctg', list => 'acct_rec, acct_pay', next_date => SYSDATE, interval => 'SYSDATE + 1/24', implicit_destroy => TRUE);
This example creates the ACCTG refresh group with two members, ACCT_REC and ACCT_PAY, that will be refreshed every hour. Additional information on setting the refresh interval is provided .
The type of refresh performed is determined by the mode that you specified when you created each snapshot. If you did not specify a refresh mode for a snapshot, Oracle performs a fast refresh if possible; otherwise, it performs a complete refresh.
Additional Information: The parameters for the MAKE procedure are described in Table 12 - 59.
DBMS_REFRESH.ADD( name => 'acctg', list => 'acct_bill', lax => TRUE);
This example adds the ACCT_BILL snapshot to the ACCTG refresh group. Setting the last argument to TRUE lets ACCT_BILL be added to ACCTG even if it must first be removed from another group.
Additional Information: The parameters for the ADD procedure are described in Table 12 - 56.
DBMS_REFRESH.SUBTRACT( name => 'acctg', list => 'acct_bill');
This example removes the ACCT_BILL snapshot from the ACCTG refresh group. This snapshot will no longer be automatically refreshed. After removing a snapshot from a refresh group, you should either refresh it manually or add it to another refresh group.
If you set IMPLICIT_DESTROY to TRUE in the MAKE call for the refresh group, Oracle automatically deletes the group whenever you subtract the last member.
Additional Information: The parameters for the SUBTRACT procedure are described in Table 12 - 61.
DBMS_REFRESH.CHANGE( name => 'acctg', next_date => SYSDATE, interval => 'SYSDATE + 1');
This example changes the refresh interval of the ACCTG group to once a day.
Additional Information: The parameters for the CHANGE procedure are described in Table 12 - 57.
Deleting a Refresh Group
If you want to remove all of the snapshots from a refresh group and delete the refresh group, call the DESTROY procedure in the DBMS_REFRESH package, as shown in the following example:
DBMS_REFRESH.DESTROY( name => 'acctg');
This example removes all of the snapshots from the ACCTG refresh group. These snapshots will no longer be automatically refreshed. You must either refresh these snapshots manually, or add the snapshots to new refresh groups.
Additional Information: The parameters for the DESTROY procedure are described in Table 12 - 58.