DBA Data[Home] [Help]

PACKAGE: GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV

Source


1 PACKAGE dbms_gsm_nopriv AS
2 
3 --*****************************************************************************
4 -- NOTE: This package is executeable by public. We *MUST* ensure that the
5 -- calling user has the correct catalog privileges at the start of every
6 -- procedure before executing any other code with the package.
7 --*****************************************************************************
8 
9 
10 --*****************************************************************************
11 -- Package Public Types
12 --*****************************************************************************
13 
14 -- Update modes for catalog lock
15 noUpdate constant  number := 0;  -- catalog is not updated
16 updNoGSM constant  number := 1;  -- catalog Update does not require running GSM
17 updGSM   constant  number := 2;  -- catalog update requires running GSM
18 
19 --*****************************************************************************
20 -- Package Public Constants
21 --*****************************************************************************
22 
23 --*****************************************************************************
24 -- Package Public Exceptions
25 --*****************************************************************************
26 
27 
28 --*****************************************************************************
29 -- Package Public Procedures
30 --*****************************************************************************
31 -------------------------------------------------------------------------------
32 --
33 -- PROCEDURE     getCatalogLock
34 --
35 -- Description:
36 --       Gets the catalog lock prior to making a change to the cloud catalog.
37 --
38 -- Parameters:
39 --       currentChangeSeq -    The current value of cloud.change_seq#
40 --                             This is the sequence # of the last committed
41 --                             change.
42 --       privs                 Privilege required for this lock operation
43 --       gdsctl_version        Version of gdsctl (GDSCTL interface only)
44 --       gsm_version           Version of GSM (GSM interface only)
45 --       gsm_name              Name of GSM (GSM interface only)
46 --       catalog_version       Version of the catalog
47 --
48 -- Notes:
49 --       WARNING: This function is executabble by "public" and runs with
50 --       gsmadmin_internal privileges. It *MUST* check that the real calling
51 --       session user has the privilege to peform catalog operations first
52 --       (before anything else is done). The "privs" and "pool_name"
53 --       parameters provide the require privileges for the current "lock"
54 --       operation. The sequence of events is that the user "locks" the catalog,
55 --       performs the desired operation, and then unlocks the catalog
56 --
57 -------------------------------------------------------------------------------
58 
59 GSMAdmin                    constant    number := 1;
60 GSMPoolAdmin                constant    number := 2;
61 
62 -- overloaded old version for backwards compatibility
63 PROCEDURE getCatalogLock( currentChangeSeq OUT number,
64                           privs IN number default GSMAdmin);
65 -- version called by GDSCTL
66 PROCEDURE getCatalogLock( currentChangeSeq OUT    number,
67                           privs            IN     number default GSMAdmin,
68                           gdsctl_version   IN     varchar2 default NULL,
69                           catalog_version  OUT    number,
70                           update_mode      IN     number
71                                default updNoGSM);
72 -- version called by GSM servers
73 PROCEDURE getCatalogLock( currentChangeSeq OUT    number,
74                           privs            IN     number default GSMAdmin,
75                           gsm_version      IN     varchar2 default NULL,
76                           gsm_name         IN     varchar2 default NULL,
77                           catalog_version  OUT    number,
78                           update_mode      IN     number
79                                default noUpdate);
80 
81 -------------------------------------------------------------------------------
82 --
83 -- PROCEDURE     releaseCatalogLock
84 --
85 -- Description:
86 --      Releases the catalog lock and commits or rolls back the changes
87 --      made under the lock.
88 --
89 -- Parameters:
90 --      action:  "releaseLockCommit" -> release lock and commit all
91 --                             changes
92 --               "releaseLockRollback" -> release lock and rollback
93 --                             all changes
94 --      changeSeq: If "action" = "releaseLockCommit" this is the change
95 --                 sequence number of the the last change made under this lock.
96 --                 If "action" = "releaseLockRollback" then will be set to 0.
97 --
98 --
99 -- Notes:
100 --
101 -------------------------------------------------------------------------------
102 
103 releaseLockCommit           constant  number := 1;
104 releaseLockRollback         constant  number := 2;
105 
106 
107 PROCEDURE releaseCatalogLock( action    IN number default releaseLockCommit,
108                               changeSeq OUT number );
109 
110 
111 END dbms_gsm_nopriv;