Oracle DBMS_GSM_COMMON
Version 19.3

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Global Service Manager Validation Utilities. The package header refers to it as "DBMS package for GWM fixed operations"
AUTHID DEFINER
Constants
Name Data Type Value
AQ Constants
aq_off NUMBER 0
aq_on NUMBER 1
Chunks Constants
chunk_up constant number :=0; NUMBER 0
chunk_readonly NUMBER 1
chunk_down NUMBER 2
ctrlchunk_invalidate NUMBER 11
ctrlchunk_readonly NUMBER chunk_readonly
ctrlchunk_down NUMBER chunk_down
ctrlchunk_up constant number := NUMBER chunk_up
CLB Goal Constants
  NUMBER 1
  NUMBER 2
CLB Goal Constants
clb_goal_none NUMBER 0
clb_goal_short NUMBER 1
clb_goal_long NUMBER 2
Commit Outcome Constants
commit_outcome_off NUMBER 0
commit_outcome_on NUMBER 1
Data Object Number Generator Constants
objnum_range NUMBER 1000000
objnum_wm NUMBER 10000
DataGuard Protection Mode Constants
max_protection NUMBER 0
max_availability NUMBER 1
max_performance NUMBER 2
DB Role Constants
db_role_none NUMBER 0
db_role_primary NUMBER 1
db_role_phys_stby NUMBER 2
db_role_log_stby NUMBER 3
db_role_snap_stby NUMBER 4
Default Drain Timeout Constants
drain_default NUMBER -1
srvc_context_is_db NUMBER 1
srvc_context_is_ocr NUMBER 2
Distributed Transaction Constants
dtp_off NUMBER 0
dtp_on NUMBER 1
Execute DDL Action Constants
execddl_default NUMBER 0
execddl_ignore NUMBER 1
execddl_skip NUMBER 2
Failover Method Constants
failover_none VARCHAR2(5) 'NONE'
failover_basic VARCHAR2(6) 'BASIC'
Failover Primary Constants
failover_primary_off NUMBER 0
failover_primary_on NUMBER 1
Failover Restore Constants
failover_restore_none VARCHAR2(5) 'NONE'
failover_restore_l1 VARCHAR2(6) 'LEVEL1'
Failover Type Constants
failover_type_none VARCHAR2(5) 'NONE'
failover_type_session VARCHAR2(8) 'SESSION'
failover_type_select VARCHAR2(7) 'SELECT'
failover_type_transact VARCHAR2(12) 'TRANSACTION'
failover_type_auto VARCHAR2(4) 'AUTO'
General Constants
max_ident NUMBER 128
Generic Boolean Constants
isFalse NUMBER 0
isTrue NUMBER 1
GSM Flag Constants
gsmflagpos_locality NUMBER 0
gsmflagpos_regionfo NUMBER 1
gsmflagops_orasvc NUMBER 2
HA Notification Constants
ha_notification_off NUMBER 0
ha_notification_on NUMBER 1
Instance Cardinality on RAC Constants
cardinality_uniform VARCHAR2(8) 'UNIFORM'
cardinality_singleton VARCHAR2(10) 'SINGLETON'
isPrimary Constants
is_prim NUMBER 0
is_stby NUMBER 1
is_actstby NUMBER 2
Lag Constants
specified_lag NUMBER 0
any_lag NUMBER 1
Locality Constants
service_anywhere NUMBER 0
service_local_only NUMBER 1
Move Chunk Operation Constants
movechunk_source NUMBER 0
movechunk_target NUMBER 1
movechunk_success NUMBER 0
movechunk_fail NUMBER 1
Move Constants
service_anywhere NUMBER 0
service_local_only NUMBER 1
Package Public Constants
cpu_thresh_param_name VARCHAR2(15) '_gsm_cpu_thresh'
default_cpu_thresh NUMBER 75
default_srlat_thresh NUMBER 20
gsm_parameter_name VARCHAR2(10) '_gsm'
max_inst_default NUMBER 10
max_inst_param_name VARCHAR2(25) '_gsm_max_instances_per_db'
max_regions_default NUMBER 10
max_regions_param_name VARCHAR2(20) '_gsm_max_num_regions'
region_list_parameter_name VARCHAR2(16) '_gsm_region_list'
srlat_thresh_param_name VARCHAR2(17) '_gsm_srlat_thresh'
Policy Constants
policy_manual constant number := 1; NUMBER 1
policy_automatic constant number := 2; NUMBER 2
Pool/Catalog Constants
pool_notsharded NUMBER 0
pool_sharded NUMBER 1
Preferred ALL DBS Constants
select_dbs NUMBER 0
prefer_all_dbs NUMBER 1
Region Failover Constants
region_failover_off NUMBER 0
region_failover_on NUMBER 1
RLB Goal Constants
rlb_goal_none constant number := 0; NUMBER 0
rlb_goal_service_time constant number := 1; NUMBER 1
rlb_goal_throughput constant number := 2; NUMBER 2
Replication Type Constants
reptype_dg NUMBER 0
reptype_ogg NUMBER 1
Session State Consistency Constants
session_state_static VARCHAR2(7) 'STATIC'
session_state_dynamic VARCHAR2(8) 'DYNAMIC'
Set GSM Parameter Constants
add_gsms NUMBER 0
replace_all_gsms NUMBER 1
remove_gsms NUMBER 2
modify_gsms NUMBER 3
Set Region List Parameter Constants
add_regions NUMBER 0
remove_regions NUMBER 1
modify_regions NUMBER 2
TAF Policy Constants
taf_none constant number := 0; NUMBER 0
taf_basic constant number := 1; NUMBER 1
taf_preconnect constant number := 2; NUMBER 2
Update Mode Constants
noUpdate NUMBER 0
updNoGSM NUMBER 1
updGSM NUMBER 2
Dependencies
DBMS_GSM_ALERTS EXECASUSER PARAM_VALUE_LIST_T
DBMS_GSM_CLOUDADMIN EXECUTEDDL PARAM_VALUE_T
DBMS_GSM_COMMON_LIB EXEC_SQL PLITBLM
DBMS_GSM_DBADMIN GSM_LIST_T RAC_INSTANCE_T
DBMS_GSM_FIXED GSM_T REGION
DBMS_GSM_POOLADMIN GV_$DATABASE REGION_LIST_T
DBMS_GSM_UTILITY INSTANCE_LIST REGION_T
DBMS_LOB LOCAL_CHUNKS UTL_RAW
DBMS_UTILITY LOCAL_CHUNK_TYPES V_$PARAMETER2
DBPARAMS_LIST MESSAGE_PARAM_LIST V_$VERSION
DBPARAMS_T    
Documented No
First Available 12.2.0.1
Security Model Owned by GSMADMIN_INTERNAL with EXECUTE granted to GGSYS, GSMADMIN_ROLE, GSM_POOLADMIN_ROLE and GSMUSER_ROLE
Source {ORACLE_HOME}/rdbms/admin/dbmsgwmco.sql

See also catgwmcat.sql
Subprograms
 
ACTIONUET
Undocumented dbms_gsm_common.actionUET(
module  IN BINARY_INTEGER,
test    IN BINARY_INTEGER,
stage   IN BINARY_INTEGER,
action  IN BINARY_INTEGER,
use_val IN BINARY_INTEGER,
value   IN BINARY_INTEGER);
TBD
 
CHECKDBCOMPAT
Check that database level is compatible with GDS dbms_gsm_common.checkDBCompat RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.checkDBCompat THEN
    dbms_output.put_line('This database is compatible');
  ELSE
    dbms_output.put_line('This database is not compatible');
  END IF;
END;
/
 
CHUNKLOWHIGH
Undocumented dbms_gsm_common.chunkLowHigh(
chunk_counter IN  BINARY_INTEGER,
total_chunks  IN  BINARY_INTEGER,
chunk_low     OUT NUMBER,
chunk_high    OUT NUMBER);
TBD
 
CLOBTOTRACE
Reformats a CLOB as a trace dbms_gsm_common.clobToTrace(phrase IN CLOB)
RETURN VARCHAR2;
SQL> SELECT gsmadmin_internal.dbms_gsm_common.clobToTrace('This is a test of the emergency formatting system')
  2  FROM dual;

GSMADMIN_INTERNAL.DBMS_GSM_COMMON.CLOBTOTRACE('THISISATESTOFTHETRACEFORMATTINGSYSTEM')
------------------------------------------------------------------------------------------
This is a test of the trace formatting system
 
DBISDOWNGRADEABLE
Returns TRUE if the database downgradeable: Otherwise FALSE dbms_gsm_common.DBisDowngradeable RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.DBisDowngradeable THEN
    dbms_output.put_line('This database can be downgraded');
  ELSE
    dbms_output.put_line('This database can not be downgraded');
  END IF;
END;
/
 
EXISTGSM
Checks if a gsm_alias already in the _gsm parameter on a database dbms_gsm_common.existGSM(gsm_alias IN VARCHAR2)
RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.existGSM('ZZYZX') THEN
    dbms_output.put_line('Alias Exists');
  ELSE
    dbms_output.put_line('Alias Does Not Exist');
  END IF;
END;
/
 
GETDBPARAMETERNUM
Undocumented dbms_gsm_common.getDBParameterNum(
pname IN VARCHAR2,
pno   IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
SELECT gsmadmin_internal.dbms_gsm_common.getDBParameterNum('_db_num_gsm', 1)
FROM dual;
 
GETDBPARAMETERSTR
Undocumented dbms_gsm_common.getDBParameterStr(
pname IN VARCHAR2,
pno   IN BINARY_INTEGER)
RETURN VARCHAR2;
SELECT gsmadmin_internal.dbms_gsm_common.getDBParameterStr('_shardgroup_name', 1)
FROM dual;
 
GETMSG
Returns the message text given message number and parameters dbms_gsm_common.getMsg(
message_NUMBER IN  BINARY_INTEGER,
message_text   OUT VARCHAR2,
params         IN  message_param_list DEFAULT message_param_list());
TBD
 
GETPARAM_DB_NUM_GSM
Undocumented dbms_gsm_common.getParam_db_num_gsm RETURN NUMBER;
SELECT gsmadmin_internal.dbms_gsm_common.getParam_db_num_gsm
FROM dual;

GETPARAM_DB_NUM_GSM
-------------------
                  0
 
GETPARAM_GWM_DATABASE_FLAGS
Undocumented dbms_gsm_common.getParam_gwm_database_flags RETURN VARCHAR2;
SELECT gsmadmin_internal.dbms_gsm_common.getParam_gwm_database_flags
FROM dual;
 
GETPARAM_SHARDGROUP_NAME
Undocumented dbms_gsm_common.getParam_shardGroup_name RETURN VARCHAR2;
SELECT gsmadmin_internal.dbms_gsm_common.getParam_shardGroup_name
FROM dual;
 
GSM_LIST_TO_GSM_PARAMS
Undocumented dbms_gsm_common.gsm_list_to_gsm_params(
gsm_list   IN  gsm_list_t,
gsm_params OUT param_value_list_t);
TBD
 
GSM_PARAMS_TO_GSM_LIST
Undocumented dbms_gsm_common.gsm_params_to_gsm_list(gsm_list OUT gsm_list_t);
TBD
 
GWMFACTOR
Factoring. Is GDS licensed? (currently requires enterprise edition) dbms_gsm_common.gwmFactor;
exec gsmadmin_internal.dbms_gsm_common.gwmFactor;
 
GWMSUBNET
Get subnet string for this host (RAC only) dbms_gsm_common.gwmSubnet(subnet OUT VARCHAR2);
DECLARE
 outVal VARCHAR2(30);
BEGIN
  gsmadmin_internal.dbms_gsm_common.gwmSubnet(outVal);
  dbms_output.put_line(outVal);
END;
/
 
INST_LIST_TO_INST_STRING
Converts an instance_list to string format dbms_gsm_common.inst_list_to_inst_string(instances IN instance_list)
RETURN VARCHAR2;
TBD
 
ISCDB
Returns TRUE if the database is a CDB dbms_gsm_common.isCDB RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.isCDB THEN
    dbms_output.put_line('The database is a CDB');
  ELSE
    dbms_output.put_line('The database is not a CDB');
  END IF;
END;
/
 
ISGWMTRACING
Checks if GWM module tracing is enabled dbms_gsm_common.isGWMTracing RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.isGWMTracing THEN
    dbms_output.put_line('The database is Tracing');
  ELSE
    dbms_output.put_line('The database is not Tracing');
  END IF;
END;
/
 
ISNONORACLECLOUD
Returns TRUE if the database is deployed in the Oracle Cloud dbms_gsm_common.isNonOracleCloud RETURN BOOLEAN;
BEGIN
  IF gsmadmin_internal.dbms_gsm_common.isNonOracleCloud THEN
    dbms_output.put_line('Oracle Cloud Deployment');
  ELSE
    dbms_output.put_line('Non-Oracle Cloud Deployment');
  END IF;
END;
/
Non-Oracle Cloud Deployment
 
ISUETENABLED
Undocumented dbms_gsm_common.isUETEnabled RETURN BINARY_INTEGER;
SELECT gsmadmin_internal.dbms_gsm_common.isUETEnabled
FROM dual;

ISUETENABLED
------------
           0
 
NUM2LINEAR
Convert numbers to a linear key representation dbms_gsm_common.num2linear(x IN NUMBER) RETURN BLOB;
DECLARE
 bVar BLOB;
BEGIN
  bVar := gsmadmin_internal.dbms_gsm_common.num2linear(42);
END;
/
 
PARAMS_TO_DBPARAM_LIST
Converts params string in NVP format to dbparams_list type dbms_gsm_common.params_to_dbparam_list(
params   IN  VARCHAR2,
dbname   OUT VARCHAR2,
dbparams OUT dbparams_list)
RETURN BOOLEAN;
TBD
 
REGION_PARAMS_TO_REGION_LIST
Return a the regions parameters in the regions list type dbms_gsm_common.region_params_to_region_list(region_list OUT region_list_t);
TBD
 
REREGISTERDB (new 18c)
Re-registers database with GSM listeners after some change dbms_gsm_common.reregisterDB;
exec gsmadmin_internal.dbms_gsm_common.reregisterDB;
 
RESETDBPARAMETER
Resets a GSM parameter
Overload 1
dbms_gsm_common.resetDBParameter(pname IN VARCHAR2);
TBD
Overload 2 dbms_gsm_common.resetDBParameter(
pname  IN VARCHAR2,
pdb_id IN BINARY_INTEGER)
TBD
 
SERVICECHANGE
Signal a service change for registration dbms_gsm_common.serviceChange;
exec gsmadmin_internal.dbms_gsm_common.serviceChange;
 
SETDBPARAMETER
Sets a GSM parameter in the database

Overload 1
dbms_gsm_common.setDBParameter(
pname  IN VARCHAR2,
pvalue IN VARCHAR2)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
Overload 2 dbms_gsm_common.setDBParameter(
pname    IN VARCHAR2,
pvalue   IN VARCHAR2,
pdb_id   IN BINARY_INTEGER,
db_uname IN VARCHAR2)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
Overload 3 dbms_gsm_common.setDBParameter(
pname   IN VARCHAR2,
pvalues IN param_value_list_t)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
Overload 4 dbms_gsm_common.setDBParameter(
pname    IN VARCHAR2,
pvalues  IN param_value_list_t,
pdb_id   IN BINARY_INTEGER,
db_uname IN VARCHAR2)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
Overload 5 dbms_gsm_common.setDBParameter(
pname   IN VARCHAR2,
pvalues IN region_list_t)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
Overload 6 dbms_gsm_common.setDBParameter(
pname    IN VARCHAR2,
pvalues  IN region_list_t,
pdb_id   IN BINARY_INTEGER,
db_uname IN VARCHAR2)
ACCESSIBLE BY (PACKAGE dbms_gsm_dbadmin,
               PACKAGE dbms_gsm_pooladmin,
               PACKAGE dbms_gsm_common,
               PACKAGE dbms_gsm_cloudadmin,
               PACKAGE ggsys.ggsharding);
TBD
 
SETGSMPARAMETER
Changes the value of the _gsm parameter on a database dbms_gsm_common.setGSMParameter(
operation IN NUMBER,
gsms      IN gsm_list_t);
TBD
 
SETREGIONLISTPARAMETER
Changes the value of the _gsm_region_list parameter on a database dbms_gsm_common.setRegionListParameter(
operation IN NUMBER,
regions   IN region_list_t);
TBD
 
UPDATECHUNKS
Refresh RDBMS chunks cache dbms_gsm_common.updateChunks;
exec gsmadmin_internal.dbms_gsm_common.updateChunks;
 
VERIFYUET
Undocumented dbms_gsm_common.verifyUET(
module IN BINARY_INTEGER,
test   IN BINARY_INTEGER,
stage  IN BINARY_INTEGER,
mesg   IN VARCHAR2);
TBD
 
WRITETOGWMTRACING
Prints using the GWM tracing mechanism

Overload 1
dbms_gsm_common.writeToGWMTracing(phrase IN VARCHAR2);
exec gsmadmin_internal.dbms_gsm_common.writeToGWMTracing('Testing 1, 2, 3');
Overload 2 dbms_gsm_common.writeToGWMTracing(
phrase IN VARCHAR2,
gdsctl_id NUMBER);
exec gsmadmin_internal.dbms_gsm_common.writeToGWMTracing('Testing 1, 2, 3', 42);

Related Topics
Built-in Functions
Built-in Packages
DBMS_GSM_ALERTS
DBMS_GSM_CLOUDADMIN
DBMS_GSM_DBADMIN
DBMS_GSM_FIX
DBMS_GSM_FIXED
DBMS_GSM_XDB
What's New In 18cR3
What's New In 19cR3

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-2019 Daniel A. Morgan All Rights Reserved
DBSecWorx