Oracle DBMS_GSM_NOPRIV
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Undocumented
AUTHID CURRENT_USER
Constants
Name Data Type Value
General
GSMAdmin NUMBER 1
GSMPoolAdmin NUMBER 2
releaseLockCommit NUMBER 1
releaseLockRollback NUMBER 2
Catalog Update Modes
noUpdate (catalog not updated) NUMBER 0
updNoGSM (catalog Update does not require running GSM) NUMBER 1
updGSM (catalog update requires running GSM) NUMBER 2
Dependencies
DBMS_GSM_POOLADMIN DBMS_LOCK DBMS_SYS_ERROR
DBMS_GSM_UTILITY    
Documented No
First Available 12.1.0.1
Security Model Owned by GSMADMIN_INTERNAL with EXECUTE granted to PUBLIC.

This function is executable by PUBLIC and runs with gsmadmin_internal privileges. It *MUST* check that the real calling session user has the privilege to perform catalog operations first -- (before anything else is done). The "privs" and "pool_name" parameters provide the require privileges for the current "lock" operation. The sequence of events is that the user "locks" the catalog, performs the desired operation, and then unlocks the catalog.
Source {ORACLE_HOME}/rdbms/admin/dbmsgwmut.sql
Subprograms
 
GETCATALOGLOCK
Gets the catalog lock prior to making a change to the cloud catalog

Overload 1
dbms_gsm_nopriv.getCatalogLock(
currentChangeSeq OUT NUMBER,
privs            IN  NUMBER DEFAULT GSMAdmin);
-- after granting execute to SYSTEM and logging on as SYSTEM
SQL> DECLARE
  2   outVal NUMBER;
  3  BEGIN
  4    gsmadmin_internal.dbms_gsm_nopriv.getCatalogLock(outVal);
  5    dbms_output.put_line(outVal);
  6  END;
  7  /
DECLARE
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV", line 55
ORA-01403: no data found
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_UTILITY", line 2683
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_UTILITY", line 2583
ORA-06512: at line 1
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV", line 47
ORA-06512: at line 4
Overload 2 dbms_gsm_nopriv.getCatalogLock(
currentChangeSeq OUT NUMBER,
privs            IN  NUMBER   DEFAULT GSMAdmin,
gdsctl_version   IN  VARCHAR2 DEFAULT NULL,
catalog_version  OUT NUMBER,
update_mode      IN  NUMBER   DEFAULT updNoGSM);
TBD
Overload 3 dbms_gsm_nopriv.getCatalogLock(
currentChangeSeq OUT NUMBER,
privs            IN  NUMBER   DEFAULT GSMAdmin,
gsm_version      IN  VARCHAR2 DEFAULT NULL,
gsm_name         IN  VARCHAR2 DEFAULT NULL,
catalog_version  OUT NUMBER,
update_mode      IN  NUMBER   DEFAULT noUpdate);
TBD
 
RELEASECATALOGLOCK
Releases the catalog lock and commits or rolls back the changes  made under the lock dbms_gsm_nopriv.releaseCatalogLock(
action    IN  NUMBER DEFAULT releaseLockCommit,
changeSeq OUT NUMBER );
SQL> DECLARE
  2   outVal NUMBER;
  3  BEGIN
  4    gsmadmin_internal.dbms_gsm_nopriv.releaseCatalogLock(changeSeq=>outVal);
  5    dbms_output.put_line(outVal);
  6  END;
  7  /
DECLARE
*
ERROR at line 1:
ORA-03739: The specified database is not configured to be a catalog.
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV", line 153
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_UTILITY", line 2708
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_UTILITY", line 73
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_UTILITY", line 2695
ORA-06512: at line 1
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV", line 149
ORA-06512: at line 4

Related Topics
Built-in Functions
Built-in Packages
DBMS_GSM_ALERTS
DBMS_GSM_CLOUDADMIN
DBMS_GSM_COMMON
DBMS_GSM_DBADMIN
DBMS_GSM_FIXED
DBMS_GSM_XDB
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved