Oracle DBMS_GSM_SEC
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai is now availble. If you haven't you downloaded already: Why?
Purpose Undocumented Global Service Manager Administration Utilities.

The installation file contains the following note: "since changes to gsmadmin_internal tables aren't propagated to logical standbys, mark all gsm packages as unsupported"
AUTHID DEFINER
Dependencies
CLEANUP_DDL DBMS_GSM_GSMUSER DBMS_LOB
DBMS_GSM_CURUSER DBMS_GSM_SEC_LIB DBMS_SYS_ERROR
DBMS_GSM_DDL DBMS_GSM_UTILITY SHARD_KEYS
DBMS_GSM_FIXED    
Documented No
First Available 20c
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(default, UNSUPPORTED);
Security Model Owned by SYS with EXECUTE granted to the GSMADMIN_ROLE, GSMCATUSER and SYSDG roles.
Source {ORACLE_HOME}/rdbms/admin/dbmsgwmfix.sql
{ORACLE_HOME}/rdbms/admin/prvtgwmfix.plb
Subprograms
 
CATSUPENC (new 23ai)
Undocumented dbms_gsm_sec.catSupEnc RETURN BOOLEAN;
BEGIN
  IF dbms_gsm_sec.catSupEnc THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F
 
CONTROLCHUNK (new 23ai)
Undocumented dbms_gsm_sec.controlChunk(
chunkid IN BINARY_INTEGER,
op      IN BINARY_INTEGER,
p1      IN BINARY_INTEGER);
TBD
 
DECLOBSTRING
Descrypts a BLOB and returns it as CLOB dbms_gsm_sec.decLobString(
enc_key    IN     RAW,
enc_string IN     BLOB,
string     IN OUT CLOB,
out_len       OUT BINARY_INTEGER);
TBD
 
DECWITHKEYID (new 23ai)
Decrypt using shard key ID dbms_gsm_sec.decWithKeyID(
enc_string IN  RAW,
dec_string OUT VARCHAR2,
key_id     IN  BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
 
DELTMPKEY
Deletes the temporary key from the SGA

The demo at right is from a 23ai database without sharding
dbms_gsm_sec.delTmpKey(dbname IN VARCHAR2);
exec dbms_gsm_sec.delTmpKey('ORABASE26');

PL/SQL procedure successfully completed.
 
ENCRYPTLOBSTRING (new 23ai)
Encrypts a CLOB string based on the provided encryption key

The demo at right is from a 23.2 database without sharding
dbms_gsm_sec.encryptLOBString(
enc_key    IN     RAW,
in_string  IN     CLOB,
enc_string IN OUT BLOB)
RETURN BINARY_INTEGER;
DECLARE
 ec     RAW(128) := utl_raw.cast_to_raw('MORGAN');
 outVal BLOB;
 retVal BINARY_INTEGER;
BEGIN
  retVal := dbms_gsm_sec.encryptLOBString(ec, 'LIBRARY', outVal);
  dbms_output.put_line(retVal);
END;
/
*
ORA-01405: The fetched column returned a NULL value.
 
GETDBPARAMETERNUM (new 23ai)
Return parameter number dbms_gsm_sec.getDBParameterNum(
pname  IN VARCHAR2,
pno    IN BINARY_INTEGER,
pdb_id IN BINARY_INTEGER)
RETURN BINARY_INTEGER;
TBD
 
GWM_TRACE_OUTPUT (new 23ai)
Undocumented dbms_gsm_sec.gwm_trace_output(phrase IN VARCHAR2);
TBD
 
PKEDEC (new 23ai)
Undocumented dbms_gsm_sec.pkeDec(
enc_string IN  RAW,
dec_string OUT VARCHAR2)
RETURN BINARY_INTEGER;
TBD
 
PUTCATUSER
Adds the GSM catalog user password to the wallet dbms_gsm_sec.putCatUser(enc_pwd IN RAW);
exec dbms_gsm_sec.putCatUSer('DCC2ABB2B90B88666D77B929A0A8C1570725F2F7');

PL/SQL procedure successfully completed.
 
PUTKEY
Puts the provided encryption key in the shard_keys table

The demo at right is from a 21c database without sharding
dbms_gsm_sec.putKey(
key_id  IN NUMBER,
sec_key IN RAW);
exec dbms_gsm_sec.putKey(3, 'DCC2ABB2B90B88666D77B929A0A8C1570725F2F7');
     *
ORA-03876: error -5 when attempting to generate a temporary key to add new shards
 
PUTMKEY (new 23ai parameters)
Instructs a Primary Database to send its master key to its Standby Databases dbms_gsm_sec.putMkey(
dbname  IN VARCHAR2 DEFAULT NULL,
connstr IN VARCHAR2 DEFAULT NULL);
exec dbms_gsm_sec.putMkey;

PL/SQL procedure successfully completed.
 
PUTTMPKEY
Stores a temporary encryption key

The demo at right is from a 21c database without sharding
dbms_gsm_sec.putTmpKey(
dbname  IN VARCHAR2,
tmp_key IN RAW);
exec dbms_gsm_sec.putTmpKey('TEST21DB', 'DCC2ABB2B90B88666D77B929A0A8C1570725F2F7');
     *
ORA-03876: error 46693 when attempting to generate a temporary key to add new shards
 
SHARDSUPPENC (new 23ai)
Undocumented dbms_gsm_sec.shardSuppEnc(
dbname         IN VARCHAR2,
connect_string IN VARCHAR2,
enc_pwd        IN RAW)
RETURN BOOLEAN;
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_GSM_ALERTS
DBMS_GSM_CLOUDADMIN
DBMS_GSM_COMMON
DBMS_GSM_DBADMIN
DBMS_GSM_DDL
DBMS_GSM_FIX
DBMS_GSM_FIXED
DBMS_GSM_NOPRIV
DBMS_GSM_POOLADMIN
DBMS_GSM_UTILITY
DBMS_GSM_XDB
What's New In 21c
What's New In 26ai

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