1 PACKAGE dbms_refresh IS
2 -- dbms_refresh is the interface for administering refresh groups.
3
4 -- CONSTANTS
5 --
6 -- constants for rgroup$.flag
7 -- NOTE: if you make any changes here, you must change the
8 -- corresponding constants in prvtsnap.sql
9 --
10 REPAPI_RGROUP CONSTANT NUMBER := 8;
11
12 -- ------------------------------------------------------------------------
13 -- MAKE a new refresh group.
14 --
15 -- PARAMETERS:
16 -- NAME is of the form 'foo' or 'user.foo' or '"USER"."FOO"'.
17 -- The logged-in user is used as a default.
18 -- LIST is a comma-separated list of objects to be refreshed, such as
19 -- 'foo, scott.bar ,"SCOTT"."BLUE"'. The default user is the owner
20 -- of the refresh group.
21 -- TAB is a PL/SQL table of objects to be refreshed, starting with 1
22 -- and filling every number until an entry is NULL, with every entry
23 -- formatted the same way as NAME. The default user is the owner
24 -- of the refresh group.
25 -- NEXT_DATE is the date for the refresh group to first be refreshed.
26 -- See dbmsjobq.sql . If there is no current job, the default interval
27 -- will be 'null' and the job will delete itself after refreshing the
28 -- group at NEXT_DATE.
29 -- INTERVAL is used to determine the next NEXT_DATE. See dbmsjobq.sql .
30 -- If there is no current job, NEXT_DATE will default to null and the
31 -- job will not run until you manually set NEXT_DATE to something else
32 -- or manually refresh the group.
33 -- IMPLICIT_DESTROY means to delete the refresh group when the last item
34 -- is subtracted from it. The value is stored with the group definition.
35 -- Empty groups can be created with IMPLICIT_DESTROY set.
36
37 PROCEDURE make(name IN VARCHAR2,
38 list IN VARCHAR2,
39 next_date IN DATE,
40 interval IN VARCHAR2,
41 implicit_destroy IN BOOLEAN := FALSE,
42 lax IN BOOLEAN := FALSE,
43 job IN BINARY_INTEGER := 0,
44 rollback_seg IN VARCHAR2 := NULL,
45 push_deferred_rpc IN BOOLEAN := TRUE,
46 refresh_after_errors IN BOOLEAN := FALSE,
47 purge_option IN BINARY_INTEGER := 1,
48 parallelism IN BINARY_INTEGER := 0,
49 heap_size IN BINARY_INTEGER := 0);
50
51 PROCEDURE make(name IN VARCHAR2,
52 tab IN dbms_utility.uncl_array,
53 next_date IN DATE,
54 interval IN VARCHAR2,
55 implicit_destroy IN BOOLEAN := FALSE,
56 lax IN BOOLEAN := FALSE,
57 job IN BINARY_INTEGER := 0,
58 rollback_seg IN VARCHAR2 := NULL,
59 push_deferred_rpc IN BOOLEAN := TRUE,
60 refresh_after_errors IN BOOLEAN := FALSE,
61 purge_option IN BINARY_INTEGER := 1,
62 parallelism IN BINARY_INTEGER := 0,
63 heap_size IN BINARY_INTEGER := 0);
64
65 PROCEDURE make_repapi(
66 refgroup IN BINARY_INTEGER,
67 name IN VARCHAR2,
68 siteid IN BINARY_INTEGER,
69 refresh_seq IN BINARY_INTEGER,
70 export_db IN VARCHAR2,
71 flag IN BINARY_INTEGER DEFAULT REPAPI_RGROUP);
72
73 -- ------------------------------------------------------------------------
74 -- ADD some refreshable objects to a refresh group.
75 PROCEDURE add(name IN VARCHAR2,
76 list IN VARCHAR2,
77 lax IN BOOLEAN := FALSE,
78 siteid IN BINARY_INTEGER := 0,
79 export_db IN VARCHAR2 := NULL );
80 PROCEDURE add(name IN VARCHAR2,
81 tab IN dbms_utility.uncl_array,
82 lax IN BOOLEAN := FALSE,
83 siteid IN BINARY_INTEGER := 0,
84 export_db IN VARCHAR2 := NULL );
85
86 -- ------------------------------------------------------------------------
87 -- SUBTRACT some refreshable objects from a refresh group.
88 PROCEDURE subtract(name IN VARCHAR2,
89 list IN VARCHAR2,
90 lax IN BOOLEAN := FALSE );
91 PROCEDURE subtract(name IN VARCHAR2,
92 tab IN dbms_utility.uncl_array,
93 lax IN BOOLEAN := FALSE );
94
95 -- ------------------------------------------------------------------------
96 -- DESTROY a refresh group, make it cease to exist.
97 PROCEDURE destroy(name IN VARCHAR2);
98
99 -- ------------------------------------------------------------------------
100 -- Change any changeable pieces of the job that does the refresh
101 PROCEDURE change(name IN VARCHAR2,
102 next_date IN DATE := NULL,
103 interval IN VARCHAR2 := NULL,
104 implicit_destroy IN BOOLEAN := NULL,
105 rollback_seg IN VARCHAR2 := NULL,
106 push_deferred_rpc IN BOOLEAN := NULL,
107 refresh_after_errors IN BOOLEAN := NULL,
108 purge_option IN BINARY_INTEGER := NULL,
109 parallelism IN BINARY_INTEGER := NULL,
110 heap_size IN BINARY_INTEGER := NULL);
111
112 -- ------------------------------------------------------------------------
113 -- Atomically, consistently refresh all objects in a refresh group now.
114 -- Clear the BROKEN flag for the job if the refresh succeeds
115 PROCEDURE refresh(name IN VARCHAR2);
116
117 -- ------------------------------------------------------------------------
118 -- Produce the text of a call for recreating the given group
119 PROCEDURE user_export(rg# IN BINARY_INTEGER,
120 mycall IN OUT VARCHAR2);
121
122 -- ------------------------------------------------------------------------
123 -- Produce the text of a call for recreating the given group item
124 PROCEDURE user_export_child(myowner IN VARCHAR2,
125 myname IN VARCHAR2,
126 mytype IN VARCHAR2,
127 mycall IN OUT VARCHAR2,
128 mysite IN BINARY_INTEGER := 0);
129
130 END dbms_refresh;