DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_OFFLINE_OG

Source


1 PACKAGE dbms_offline_og AUTHID CURRENT_USER AS
2 
3   -------------
4   -- TYPE DEFINITIONS
5   --
6   TYPE SetOfSiteType IS TABLE OF VARCHAR2(256)
7      INDEX BY BINARY_INTEGER;
8 
9   -------------
10   -- EXCEPTIONS
11   --
12 
13   badargument EXCEPTION;
14     PRAGMA exception_init(badargument, -23430);
15     badargument_num NUMBER := -23430;
16 
17   wrongstate EXCEPTION;
18     PRAGMA exception_init(wrongstate, -23431);
19     wrongstate_num NUMBER := -23431;
20 
21   sitealreadyexists EXCEPTION;
22     PRAGMA exception_init(sitealreadyexists, -23432);
23     sitealreadyexists_num NUMBER := -23432;
24 
25   wrongsite EXCEPTION;
26     PRAGMA exception_init (wrongsite, -23433);
27     wrongsite_num NUMBER := -23433;
28 
29   unknownsite EXCEPTION;
30     PRAGMA exception_init (unknownsite, -23434);
31     unknownsite_num NUMBER := -23434;
32 
33 
34   -------------
35   -- PROCEDURES
36   --
37 
38   -------------------------------------------------------------------------
39   -- Effects: This routine adds a new site "new_site" to the object group
40   --   "gname."  It readies the new site for offline importation of the
41   --   group's objects.  The fname parameter is reserved for internal use.
42   --   Do not specify this parameter unless directed
43   --   by Oracle Worldwide Customer Support.
44   --   The state of the replicated object group must be
45   --   QUIESCED before this routine is run; otherwise, an exception
46   --   is raised. This routine must be run at the master definition site.
47   --   Raises the following exceptions:
48   --      badargument:
49   --            if "gname" or "new_site" is NULL or ''
50   --      dbms_repcat.nonmasterdef:
51   --            if the site this routine is executing at is not the
52   --            master def. site.
53   --      sitealreadyexists:
54   --            if "new_site" is already a new master site
55   --      wrongstate:
56   --            if master def site is not in QUIESCED state
57   --      dbms_repcat.missingrepgroup:
58   --            if "gname" does not name an object group
59   --      dbms_repcat.missingflavor:
60   --            if "fname" does not name a published flavor
61   --            for the object group
62   --
63   PROCEDURE begin_instantiation (gname     IN VARCHAR2,
64                                  new_site  IN VARCHAR2,
65                                  fname     IN VARCHAR2 := NULL);
66 
67   -------------------------------------------------------------------------
68   -- Effects:  For the object group "gname" this routine resumes
69   --   normal activity for all master sites except for the new site
70   --   "new_site."  The state of the replicated object group at each site
71   --   must be QUIESCED; otherwise, an exception is raised.  When this
72   --   routine returns normally, all sites are in the NORMAL state except
73   --   for the new site, which is still in the QUIESCED state.  This
74   --   routine disables propagation of the queues from all sites
75   --   originally in the object group to the new site "new_site."  It
76   --   is meant to prevent the pushing of the queues to the new site
77   --   until the new site is instantiated.
78   --   This routine must be executed at the master definition site.
79   --   Raises the following exceptions:
80   --      badargument:
81   --           if "gname" or "new_site" is NULL or ''
82   --      dbms_repcat.nonmasterdef:
83   --           if the site this routine is executing at is not the
84   --           master def. site.
85   --      unknownsite:
86   --           "new_site" not known to object group
87   --      wrongstate:
88   --          if master def site is not in QUIESCED state
89   --      dbms_repcat.missingrepgroup:
90   --          if "gname" does not name an object group
91   --
92   PROCEDURE resume_subset_of_masters (gname    IN VARCHAR2,
93           	                      new_site IN VARCHAR2,
94                                       override IN BOOLEAN := FALSE);
95 
96 
97   -------------------------------------------------------------------------
98   -- Effects: For object group "gname" this routine integrates the site
99   --   "new_site" into the set of existing sites.  When the routine returns
100   --   normally, all sites can communicate with each other.
101   --   This routine re-enables propagation of the queues from all sites
102   --   originally in the object group to the new site "new_site."
103   --   Applications may now push the queues to the new site, now that it is
104   --   instantiated.  All sites in the object group are in the NORMAL state.
105   --   This routine  must be executed at the master definition site.
106   --   Raises the following exceptions:
107   --      badargument:
108   --            if "gname" or "new_site" is NULL or ''
109   --      dbms_repcat.nonmasterdef:
110   --            if the site this routine is executing at is not the
111   --            master def. site.
112   --      unknownsite:
113   --            site "new_site" is not known to schema "sname".
114   --      wrongstate:
115   --            if master def site is not in NORMAL state
116   --      dbms_repcat.missingrepgroup:
117   --            if "gname" does not name an object group
118   --
119   PROCEDURE end_instantiation (gname    IN VARCHAR2,
120 		               new_site In VARCHAR2);
121 
122   -------------------------------------------------------------------------
123   -- Effects: Starts the instantiation or migration of the object group
124   --    "gname" at site "new_site." When this routine returns normally, this
125   --    site is readied for loading or migrating user-defined tables.
126   --    The site must be in the QUIESCED state when this routine is
127   --    invoked; otherwise an exception is raised.  It disables
128   --    propagation of the queues from the site "new_site" to
129   --    all sites originally in the object group.  This routine must
130   --    be invoked at the site.
131   --    Raises the following exceptions:
132   --      badargument:
133   --            if "gname" or "site" is null or ''
134   --      wrongsite:
135   --            routine is not executing against site "site"
136   --      unknownsite:
137   --            "site" is an unknown master site
138   --      wrongstate:
139   --            if this site is not in QUIESCED state
140   --      dbms_recpat.missingrepgroup:
141   --            if "gname" does not name an object group
142   --
143   PROCEDURE begin_load (gname     IN VARCHAR2,
144   	                new_site  IN VARCHAR2);
145 
146   -------------------------------------------------------------------------
147   --  Effects:  This routine ends the instantiation of object group
148   --    "gname" at site "new_site" and resumes normal activity.  It verifies
149   --    the local object group is at the given flavor.  The site
150   --    must be in the NORMAL state; otherwise, an exception is raised.
151   --    It re-enables propagation of the queues from the new site
152   --    "new_site" to all the sites originally in the object group
153   --    before the new site was added.  The object group is now ready
154   --    for normal activity that, from now on, will involve the new
155   --    site. The fname parameter is reserved for internal use.
156   --    Do not specify this parameter unless directed
157   --    by Oracle Worldwide Customer Support.
158   --   Raises the following exceptions:
159   --      badargument:
160   --           if "sname" or "new_site" is NULL or ''
161   --      wrongsite:
162   --           routine is not executing against site "new_site"
163   --      unknownsite:
164   --           "new_site" is an unknown master site
165   --      wrongstate:
166   --          if this site is not in NORMAL state
167   --      dbms_repcat.missingrepgroup:
168   --          if "gname" does not name an object group
169   --      dbms_repcat.flavornoobject:
170   --          if there is an extra column or attribute
171   --      dbms_repcat.flavorcontains:
172   --          if an object, column or attribute is missing
173   --
174   PROCEDURE end_load (gname    IN VARCHAR2,
175                       new_site IN VARCHAR2,
176                       fname    IN VARCHAR2 := NULL);
177 
178   -------------------------------------------------------------------------
179   ---
180   ---
181   ---
182   --- #######################################################################
183   --- #######################################################################
184   ---                        INTERNAL PROCEDURES
185   ---
186   --- The following procedures provide internal functionality and should
187   --- not be called directly. Invoking these procedures may corrupt your
188   --- replication environment.
189   ---
190   --- #######################################################################
191   --- #######################################################################
192   PROCEDURE begin_flavor_change (gname   IN VARCHAR2,
193                                  site    IN VARCHAR2,
194                                  fname   IN VARCHAR2 := NULL);
195   PROCEDURE end_flavor_change (gname  IN VARCHAR2,
196 		               site   IN VARCHAR2);
197 end;