1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| scott@ORA92> CREATE TABLE testsnap (col1 NUMBER PRIMARY KEY)
2 /
Table created.
scott@ORA92> INSERT INTO testsnap VALUES (1)
2 /
1 row created.
scott@ORA92> CREATE SNAPSHOT LOG ON testsnap
2 /
Materialized view log created.
scott@ORA92> CREATE SNAPSHOT SNAPCOPIE1
2 REFRESH FAST with primary key
3 START WITH SYSDATE
4 NEXT SYSDATE+1/24/60
5 AS (SELECT * FROM testsnap)
6 /
Materialized view created.
scott@ORA92> INSERT INTO testsnap VALUES (2)
2 /
1 row created.
scott@ORA92> COMMIT
2 /
Commit complete.
scott@ORA92> SELECT * FROM snapcopie1
2 /
COL1
----------
1
scott@ORA92> EXECUTE DBMS_SNAPSHOT.REFRESH ('snapcopie1','f')
PL/SQL procedure successfully completed.
scott@ORA92> SELECT * FROM snapcopie1
2 /
COL1
----------
1
2 |
Partager