Oracle DBMS_HS
Version 21c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Public procedures for creating and altering objects in the Heterogeneous Services (HS) dictionary.
AUTHID DEFINER
Dependencies
DBMS_HS_ALT HS_CLASS_CAPS HS_FDS_INST
DBMS_HS_CHK HS_CLASS_DD HS_INST_CAPS
DBMS_HS_UTL HS_CLASS_INIT HS_INST_DD
HS$_BASE_CAPS HS_FDS_CLASS HS_INST_INIT
HS$_BASE_DD    
Documented No
Exceptions
Error Code Reason
-24270 dupl_base_caps
dupl_base_dd
dupl_class_caps
dupl_class_dd
dupl_class_init
dupl_fds_class
dupl_fds_inst
dupl_inst_caps
dupl_inst_dd
dupl_inst_init
-24271 bad_TRANSLATION_TYPE
-24272 bad_INIT_VALUE_TYPE
-24273 bad_TRANSLATION_TEXT
-24274 miss_base_caps
miss_base_dd
miss_class_caps
miss_class_dd
miss_class_init
miss_fds_class
miss_fds_inst
miss_inst_caps
miss_inst_dd
miss_inst_init
First Available Not known
Security Model Owned by SYS with EXECUTE granted to the HS_ADMIN_EXECUTE_ROLE role.
Source {ORACLE_HOME}/rdbms/admin/dbmshs.sql
{ORACLE_HOME}/rdbms/admin/prvths.plb
Subprograms
 
ALTER_BASE_CAPS
Alters a row in the HS$_BASE_CAPS table dbms_hs.alter_base_caps(
cap_number          IN NUMBER,
new_cap_number      IN NUMBER   := -1e-130,
new_cap_description IN VARCHAR2 := '-');
TBD
 
ALTER_BASE_DD
Alters a row in the HS$_BASE_DD table dbms_hs.alter_base_dd(
dd_table_name     IN VARCHAR2,
new_dd_table_name IN VARCHAR2 := '-',
new_dd_table_desc IN VARCHAR2 := '-');
TBD
 
ALTER_CLASS_CAPS
Alters the contents of the HS$_CLASS_CAPS table dbms_hs.alter_class_caps(
fds_class_name      IN VARCHAR2,
cap_number          IN NUMBER,
new_fds_class_name  IN VARCHAR2 := '-',
new_cap_number      IN NUMBER   := -1e-130,
new_context         IN NUMBER   := -1e-130,
new_translation     IN VARCHAR2 := '-',
new_additional_info IN NUMBER   := -1e-130);
TBD
 
ALTER_CLASS_DD
Modifies the contents of the HS$_CLASS_DD table dbms_hs.alter_class_dd(
fds_class_name       IN VARCHAR2,
dd_table_name        IN VARCHAR2,
new_fds_class_name   IN VARCHAR2 := '-',
new_dd_table_name    IN VARCHAR2 := '-',
new_translation_type IN CHAR     := '-',
new_translation_text IN VARCHAR2 := '-');
TBD
 
ALTER_CLASS_INIT
Alters the contents of the HS$_CLASS_INIT table dbms_hs.alter_class_init(
fds_class_name      IN VARCHAR2,
init_value_name     IN VARCHAR2,
new_fds_class_name  IN VARCHAR2 := '-',
new_init_value_name IN VARCHAR2 := '-',
new_init_value      IN VARCHAR2 := '-',
new_init_value_type IN VARCHAR2 := '-');
TBD
 
ALTER_FDS_CLASS
Alters the contents of the HS$_FDS_CLASS table dbms_hs.alter_fds_class(
fds_class_name         IN VARCHAR2,
new_fds_class_name     IN VARCHAR2 := '-',
new_fds_class_comments IN VARCHAR2 := '-');
TBD
 
ALTER_FDS_INST
Modifies the contents of the HS$_FDS_INST table dbms_hs.alter_fds_inst(
fds_inst_name         IN VARCHAR2,
fds_class_name        IN VARCHAR2,
new_fds_inst_name     IN VARCHAR2 := '-',
new_fds_class_name    IN VARCHAR2 := '-',
new_fds_inst_comments IN VARCHAR2 := '-');
TBD
 
ALTER_INST_CAPS
Modifies the contents of the $HS_INST_CAPS table dbms_hs.alter_inst_caps(
fds_inst_name       IN VARCHAR2,
fds_class_name      IN VARCHAR2,
cap_number          IN NUMBER,
new_fds_inst_name   IN VARCHAR2 := '-',
new_fds_class_name  IN VARCHAR2 := '-',
new_cap_number      IN NUMBER   := -1e-130,
new_context         IN NUMBER   := -1e-130,
new_translation     IN VARCHAR2 := '-',
new_additional_info IN NUMBER   := -1e-130);
TBD
 
ALTER_INST_DD
Alters the contents of the HS$_INST_DD table dbms_hs.alter_inst_dd(
fds_inst_name        IN VARCHAR2,
fds_class_name       IN VARCHAR2,
dd_table_name        IN VARCHAR2,
new_fds_inst_name    IN VARCHAR2 := '-',
new_fds_class_name   IN VARCHAR2 := '-',
new_dd_table_name    IN VARCHAR2 := '-',
new_translation_type IN CHAR     := '-',
new_translation_text IN VARCHAR2 := '-');
TBD
 
ALTER_INST_INIT
Alters the contents of the HS$_INST_INIT table dbms_hs.alter_inst_init(
fds_inst_name       IN VARCHAR2,
fds_class_name      IN VARCHAR2,
init_value_name     IN VARCHAR2,
new_fds_inst_name   IN VARCHAR2 := '-',
new_fds_class_name  IN VARCHAR2 := '-',
new_init_value_name IN VARCHAR2 := '-',
new_init_value      IN VARCHAR2 := '-',
new_init_value_type IN VARCHAR2 := '-');
TBD
 
COPY_CLASS
Copies everything for a class to another class dbms_hs.copy_class(
old_fds_class_name     IN VARCHAR2,
new_fds_class_name     IN VARCHAR2,
new_fds_class_comments IN VARCHAR2 DEFAULT '-');
TBD
 
COPY_INST
Copies everything for an HS$_FDS_INST to a new inst in the same FDS_CLASS dbms_hs.copy_inst(
fds_inst_name     IN VARCHAR2,
fds_class_name    IN VARCHAR2,
new_fds_inst_name IN VARCHAR2,
new_fds_comments  IN VARCHAR2 DEFAULT '-');
TBD
 
CREATE_BASE_CAPS
Creates a row in the HS$_BASE_CAPS table dbms_hs.create_base_caps(
cap_number      IN NUMBER,
cap_description IN VARCHAR2 := NULL);
TBD
 
CREATE_BASE_DD
Creates a row in the HS$_BASE_DD table dbms_hs.create_base_dd(
dd_table_name IN VARCHAR2,
dd_table_desc IN VARCHAR2 := NULL);
TBD
 
CREATE_CLASS_CAPS
Creates a row in the HS$_CLASS_CAPS table dbms_hs.create_class_caps(
fds_class_name  IN VARCHAR2,
cap_number      IN NUMBER,
context         IN NUMBER   := NULL,
translation     IN VARCHAR2 := NULL,
additional_info IN NUMBER   := NULL);
TBD
 
CREATE_CLASS_DD
Creates a row in the HS$_CLASS_DD table dbms_hs.create_class_dd(
fds_class_name   IN VARCHAR2,
dd_table_name    IN VARCHAR2,
translation_type IN CHAR,
translation_text IN VARCHAR2 := NULL);
TBD
 
CREATE_CLASS_INIT
Creates a row in the HS$_CLASS_INIT table dbms_hs.create_class_init(
fds_class_name  IN VARCHAR2,
init_value_name IN VARCHAR2,
init_value      IN VARCHAR2,
init_value_type IN VARCHAR2);
TBD
 
CREATE_FDS_CLASS
Creates a row in the HS$_FDS_CLASS table dbms_hs.create_fds_class(
fds_class_name     IN VARCHAR2,
fds_class_comments IN VARCHAR2 := NULL);
TBD
 
CREATE_FDS_INST
Creates a row in the HS$_FDS_INST table dbms_hs.create_fds_inst(
fds_inst_name     IN VARCHAR2,
fds_class_name    IN VARCHAR2,
fds_inst_comments IN VARCHAR2 := NULL);
TBD
 
CREATE_INST_CAPS
Creates a row in the HS$_INST_CAPS table dbms_hs.create_inst_caps(
fds_inst_name   IN VARCHAR2,
fds_class_name  IN VARCHAR2,
cap_number      IN NUMBER,
context         IN NUMBER   := NULL,
translation     IN VARCHAR2 := NULL,
additional_info IN NUMBER   := NULL);
TBD
 
CREATE_INST_DD
Creates a row in the HS$_INST_DD table dbms_hs.create_inst_dd(
fds_inst_name    IN VARCHAR2,
fds_class_name   IN VARCHAR2,
dd_table_name    IN VARCHAR2,
translation_type IN CHAR,
translation_text IN VARCHAR2 := NULL);
TBD
 
CREATE_INST_INIT
Creates a row in the HS$_INST_INIT table dbms_hs.create_inst_init(
fds_inst_name   IN VARCHAR2,
fds_class_name  IN VARCHAR2,
init_value_name IN VARCHAR2,
init_value      IN VARCHAR2,
init_value_type IN VARCHAR2);
TBD
 
DROP_BASE_CAPS
drops a row from the HS$_BASE_CAPS table as specified by the CAP_NUMBER parameter

Example from $ORACLE_HOME/rdbms/ admin/c1102000.sql
dbms_hs.drop_base_caps(cap_number IN NUMBER);
DECLARE
 capno NUMBER;

 CURSOR c1 IS
 SELECT cap_number FROM hs_base_caps WHERE cap_number >= 1000;
BEGIN
  OPEN c1;
  LOOP
    FETCH c1 INTO capno;
    EXIT WHEN c1%NOTFOUND;

    dbms_hs.drop_base_caps(capno);
  END LOOP;
END;
/
 
DROP_BASE_DD
Drops a row from the HS$_BASE_DD table as specified by table_name dbms_hs.drop_base_dd(dd_table_name IN VARCHAR2);
TBD
 
DROP_CLASS_CAPS
This procedure deletes a row from the HS$_CLASS_CAPS table as specified by the FDS_CLASS_NAME and CAP_NUMBER dbms_hs.drop_class_caps(
fds_class_name IN VARCHAR2,
cap_number     IN NUMBER);
TBD
 
DROP_CLASS_DD
Deletes row in HS$_CLASS_DD specified by FDS_CLASS_NAME and DD_TABLE_NAME dbms_hs.drop_class_dd(
fds_class_name IN VARCHAR2,
dd_table_name  IN VARCHAR2);
TBD
 
DROP_CLASS_INIT
Drops row in HS$_CLASS_INIT as specified by FDS_CLASS_NAME and INIT_VALUE_NAME dbms_hs.drop_class_init(
fds_class_name  IN VARCHAR2,
init_value_name IN VARCHAR2);
TBD
 
DROP_FDS_CLASS
Drops row in HS$_FDS_CLASS as specified by FDS_CLASS_NAME

Example from $ORACLE_HOME/rdbms/ admin/c1102000.sql

And yes ... that is VARCHAR(30) not VARCHAR2
dbms_hs.drop_fds_class(fds_class_name IN VARCHAR2);
DECLARE
  classname VARCHAR(30);
  CURSOR c1 IS SELET fds_class_name FROM hs_fds_class;
BEGIN
  OPEN c1;
  LOOP
    FETCH c1 INTO classname;
    EXIT WHEN c1%NOTFOUND;

    dbms_hs.drop_fds_class(classname);
  END LOOP;
END;
/
 
DROP_FDS_INST
Drops row in HS$_FDS_INST table as specified by FDS_INST_NAME and FDS_CLASS_NAME dbms_hs.drop_fds_inst(
fds_inst_name  IN VARCHAR2,
fds_class_name IN VARCHAR2);
TBD
 
DROP_INST_CAPS
Delete rows in HS$_INST_CAPS specified by FDS_INST_NAME, FDS_CLASS_NAME and CAP_NUMBER dbms_hs.drop_inst_caps(
fds_inst_name  IN VARCHAR2,
fds_class_name IN VARCHAR2,
cap_number     IN NUMBER);
TBD
 
DROP_INST_DD
Drops rows from HS$_INST_DD specified by FDS_INST_NAME, FDS_CLASS_NAME and DD_TABLE_NAME dbms_hs.drop_inst_dd(
fds_inst_name  IN VARCHAR2,
fds_class_name IN VARCHAR2,
dd_table_name  IN VARCHAR2);
TBD
 
DROP_INST_INIT
Drops rows from HS$_INST_INIT table as specified by FDS_INST_NAME, FDS_CLASS_NAME, and INIT_VALUE_NAME dbms_hs.drop_inst_init(
fds_inst_name   IN VARCHAR2,
fds_class_name  IN VARCHAR2,
init_value_name IN VARCHAR2);
TBD
 
REPLACE_BASE_CAPS
Creates or replaces a row in the HS$_BASE_CAPS table

Example is extracted from $ORACLE_HOME/rdbms/admin c1201000.sql
dbms_hs.replace_base_caps(
cap_number          IN NUMBER,
new_cap_number      IN NUMBER   := NULL,
new_cap_description IN VARCHAR2 := NULL);
Rem Bug17765342 add row archival

exec dbms_hs.replace_base_caps(6019, 6019, 'alter session set archival row visibility = ...');
 
REPLACE_BASE_DD
Creates or replaces a row in the HS$_BASE_DD table

Example is extracted from $ORACLE_HOME/rdbms/admin caths.sql
dbms_hs.replace_base_dd(
dd_table_name     IN VARCHAR2,
new_dd_table_name IN VARCHAR2 := NULL,
new_dd_table_desc IN VARCHAR2 := NULL);
BEGIN
/*------------------------------------------------*/
/* DD translations used to test HS installation */
/*------------------------------------------------*/
  dbms_hs.replace_base_dd('DD_TKHODDTR1', 'DD_TKHODDTR1', NULL);
  dbms_hs.replace_base_dd('DD_TKHODDTR3', 'DD_TKHODDTR3', NULL);
  ...
  dbms_hs.replace_base_dd('SESSION_PRIVS', 'SESSION_PRIVS', NULL);
  dbms_hs.replace_base_dd('SESSION_ROLES', 'SESSION_ROLES', NULL);
END;
/
 
REPLACE_CLASS_CAPS
Performs 'create or replace' on the HS$_CLASS_CAPS table

Example is extracted from $ORACLE_HOME/rdbms/admin caths.sql
dbms_hs.replace_class_caps(
fds_class_name      IN VARCHAR2,
cap_number          IN NUMBER,
new_fds_class_name  IN VARCHAR2 := NULL,
new_cap_number      IN NUMBER   := NULL,
new_context         IN NUMBER   := NULL,
new_translation     IN VARCHAR2 := NULL,
new_additional_info IN NUMBER   := NULL);
BEGIN
/*-------------------------------*/
/* Base capability definitions */
/*-------------------------------*/
  dbms_hs.replace_base_caps(1, 1, 'op1 > op2');
  dbms_hs.replace_base_caps(2, 2, 'op1 < op2');
  dbms_hs.replace_base_caps(3, 3, 'op1 >= op2');
  dbms_hs.replace_base_caps(4, 4, 'op1 <= op2');
  dbms_hs.replace_base_caps(5, 5, 'op1 = op2');
  dbms_hs.replace_base_caps(6, 6, 'op1 <> op2');
  dbms_hs.replace_base_caps(7, 7, 'INTERSECT');
  dbms_hs.replace_base_caps(8, 8, 'UNION');
  dbms_hs.replace_base_caps(9, 9, 'MINUS');
  dbms_hs.replace_base_caps(10, 10, 'op1 + op2 (arithmetic)');
  dbms_hs.replace_base_caps(11, 11, 'op1 - op2 (arithmetic)');
  dbms_hs.replace_base_caps(12, 12, 'op1 * op2 (arithmetic)');
  dbms_hs.replace_base_caps(13, 13, 'op1 / op2 (arithmetic)');
  dbms_hs.replace_base_caps(14, 14, '-op1 (arithmetic)');
  dbms_hs.replace_base_caps(15, 15, 'AVG(op1)');
  ...
  dbms_hs.replace_base_caps(8000, 8000, '');
END;

/
 
REPLACE_CLASS_DD
Performs a 'create or replace' on the HS$_CLASS_DD table dbms_hs.replace_class_dd(
fds_class_name       IN VARCHAR2,
dd_table_name        IN VARCHAR2,
new_fds_class_name   IN VARCHAR2 := NULL,
new_dd_table_name    IN VARCHAR2 := NULL,
new_translation_type IN CHAR     := NULL,
new_translation_text IN VARCHAR2 := NULL);
TBD
 
REPLACE_CLASS_INIT
Creates or updates a row in the HS$_CLASS_INIT table dbms_hs.replace_class_init(
fds_class_name      IN VARCHAR2,
init_value_name     IN VARCHAR2,
new_fds_class_name  IN VARCHAR2 := NULL,
new_init_value_name IN VARCHAR2 := NULL,
new_init_value      IN VARCHAR2 := NULL,
new_init_value_type IN VARCHAR2 := NULL);
TBD
 
REPLACE_FDS_CLASS
Creates or replaces operations on the HS$_FDS_CLASS table

Example is extracted from $ORACLE_HOME/rdbms/admin caths.sql
dbms_hs.replace_fds_class(
fds_class_name         IN VARCHAR2,
new_fds_class_name     IN VARCHAR2 := NULL,
new_fds_class_comments IN VARCHAR2 := NULL);
BEGIN
  dbms_hs.replace_fds_class('BITE', 'BITE', 'Built-In Test Environment');
END;
/
 
REPLACE_FDS_INST
Creates or replaces rows in the HS$_FDS_INST table dbms_hs.replace_fds_inst(
fds_inst_name         IN VARCHAR2,
fds_class_name        IN VARCHAR2,
new_fds_inst_name     IN VARCHAR2 := NULL,
new_fds_class_name    IN VARCHAR2 := NULL,
new_fds_inst_comments IN VARCHAR2 := NULL,);
TBD
 
REPLACE_INST_CAPS
Creates or replaces on the HS$_INST_CAPS table dbms_hs.replace_inst_caps(
fds_inst_name       IN VARCHAR2,
fds_class_name      IN VARCHAR2,
cap_number          IN NUMBER,
new_fds_inst_name   IN VARCHAR2 := NULL,
new_fds_class_name  IN VARCHAR2 := NULL,
new_cap_number      IN NUMBER   := NULL,
new_context         IN NUMBER   := NULL,
new_translation     IN VARCHAR2 := NULL,
new_additional_info IN NUMBER   := NULL);
TBD
 
REPLACE_INST_DD
Performs a create or replace operation on the HS$_INST_DD table dbms_hs.replace_inst_dd(
fds_inst_name        IN VARCHAR2,
fds_class_name       IN VARCHAR2,
dd_table_name        IN VARCHAR2,
new_fds_inst_name    IN VARCHAR2 := NULL,,
new_fds_class_name   IN VARCHAR2 := NULL,,
new_dd_table_name    IN VARCHAR2 := NULL,,
new_translation_type IN CHAR     := NULL
new_translation_text IN VARCHAR2 := NULL,);
TBD
 
REPLACE_INST_INIT
Performs a create or replace on the HS$_INST_INIT table dbms_hs.replace_inst_init(
fds_inst_name       IN VARCHAR2,
fds_class_name      IN VARCHAR2,
init_value_name     IN VARCHAR2,
new_fds_inst_name   IN VARCHAR2 := NULL,
new_fds_class_name  IN VARCHAR2 := NULL,
new_init_value_name IN VARCHAR2 := NULL,
new_init_value      IN VARCHAR2 := NULL,
new_init_value_type IN VARCHAR2 := NULL);
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_HS_ALT
DBMS_HS_CHK
DBMS_HS_PARALLEL
DBMS_HS_PARALLEL_METADATA
DBMS_HS_PASSTHROUGH
DBMS_HS_UTL
What's New In 21c
What's New In 23c

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