Using
Oracle
dbms_refresh
Creating
Oracle materialized view
Refresh Groups using
Oracle
dbms_refresh:
BEGIN
DBMS_REFRESH.ADD(
name => '"SCOTT"."REP_GROUP1"',
list => '"SCOTT"."EMP","SCOTT"."DEPT"',
lax => TRUE);
END;
/
To remove SCOTT.DEPT from REP_GROUP1, use
the dbms_refresh.subtract procedure.
BEGIN
DBMS_REFRESH.SUBTRACT(
name => '"SCOTT"."REP_GROUP1"',
list => 'SCOTT"."DEPT"',
lax => FALSE);
END;
/
If a
materialized view is removed from a refresh
group without being placed in another group,
it will be placed in its own refresh group.
The Oracle dbms_refresh package handles the
jobs that execute the refresh groups. When a
materialized view is added
To add materialized views to RE_GROUP1,
use the dbms_refresh.add procedure.
BEGIN
DBMS_REFRESH.ADD(
name => '"SCOTT"."REP_GROUP1"',
list => '"SCOTT"."DEPT"',
lax => TRUE);
END;
/
BEGIN
DBMS_REFRESH.ADD(
name => '"SCOTT"."REP_GROUP1"',
list => '"SCOTT"."EMP"',
lax => TRUE);
END;
/
|
|