Oracle DBMS_MGD_ID_UTL
Version 21c

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 Support utilities for Java such as setting the host and port of the proxy server for internet access.

This package, and the user that owns it, are not installed by default by OUI or DBCA.
AUTHID CURRENT_USER
Constants
Name Data Type Value
Logging levels
LOGGING_LEVEL_OFF INTEGER 0
LOGGING_LEVEL_SEVERE INTEGER 1
LOGGING_LEVEL_WARNING INTEGER 2
LOGGING_LEVEL_INFO INTEGER 3
LOGGING_LEVEL_FINE INTEGER 4
LOGGING_LEVEL_FINER INTEGER 5
LOGGING_LEVEL_FINEST INTEGER 6
LOGGING_LEVEL_ALL INTEGER 7
Predelivered category ids and names
EPC_ENCODING_CATEGORY_ID BINARY_INTEGER 1
EPC_ENCODING_CATEGORY_NAME VARCHAR2(32) 'EPC'
Dependencies
STANDARD (only)    
Documented Yes
Exceptions
Error Code Reason
ORA-55200 TDTJavaException
ORA-55201 TDTCategoryNotFound
ORA-55202 TDTSchemeNotFound
ORA-55203 TDTLevelNotFound
ORA-55204 TDTOptionNotFound
ORA-55205 TDTFieldValidationException
ORA-55206 TDTUndefinedField
ORA-55207 TDTRuleEvaluationFailed
ORA-55208 TDTTooManyMatchingLevels
First Available 11.2
Security Model Owned by MGDSYS with no privileges granted.
Source

Oracle Corp. changed MGDSYS to NO AUTHENTICATION but neglected to alter the package body code so that it would compile as can be seen at the bottom of the listing at right.
{ORACLE_HOME}/rdbms/admin/mgdus.sql
SQL> host
[oracle@test21 dbhome_1]$ cd rdbms/admin
[oracle@test21 admin]$ grep -ir "create user mgdsys"
mgdsys.sql: ' create user MGDSYS no authentication ';

SQL> @?/rdbms/admin/mgdsys.sql

Session altered.

.. Creating MGDSYS schema with no authentication

PL/SQL procedure successfully completed.

.. Altering MGDSYS schema with no authentication

User altered.

.. lock the user and expire the password
alter user MGDSYS ACCOUNT LOCK PASSWORD EXPIRE
*
ERROR at line 1:
ORA-28010: cannot expire external users, global users, or users with no authentication method


.. Granting permissions to MGDSYS

Grant succeeded.

Grant succeeded.

Call completed.

Call completed.

Call completed.

Call completed.

Call completed.

Session altered.

SQL> @?{ORACLE_HOME}/rdbms/admin/mgdus.sql

Session altered.

Package created.

No errors.

Package created.

Session altered.

SQL> @?/rdbms/admin/prvtmgdub.plb

Session altered.

Warning: Package Body created with compilation errors.

Errors for PACKAGE BODY DBMS_MGD_ID_UTL:

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
1/14 PLS-00201: identifier 'DBMS_MGD_ID_UTL' must be declared
1/14 PLS-00304: cannot compile body of 'DBMS_MGD_ID_UTL' without its specification

Warning: Package Body created with compilation errors.

Session altered.

-- created a synonym to make one additional valiant attempt in 21c
SQL> CREATE SYNONYM dbms_mgd_id_utl FOR mgdsys.dbms_mgd_id_utl;

Synonym created.

-- the synonym did not help and it is not possible to fix the wrapped .PLB file.
Subprograms
 
ADD_SCHEME
Adds a tag data translation scheme to an existing category dbms_mgd_id_utl.add_scheme(category_id IN VARCHAR2, tdt_xml IN CLOB);
TBD
 
CREATE_CATEGORY
Creates a new category, or a new version of a category dbms_mgd_id_utl.create_category(
category_name    IN VARCHAR2,
category_version IN VARCHAR2,
agency           IN VARCHAR2,
uri              IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
EPC_TO_ORACLE_SCHEME
Converts EPCGlobal tag data translation xml to Oracle tag data translation XML dbms_mgd_id_utl.epc_to_oracle_schema(xmlScheme IN CLOB)
RETURN CLOB;
TBD
 
GET_CATEGORY_ID
Returns the category id for the input category name and category version dbms_mgd_id_utl.get_category_id(
category_name    IN VARCHAR2,
category_version IN VARCHAR2)
RETURN VARCHAR2;
SELECT mgdsys.dbms_mgd_id_utl.get_category_id('EPC', '1')
FROM dual;
 
GET_COMPONENTS
Returns a list of semicolon separated component names, separated  for the scheme dbms_mgd_id_utl.get_components(
category_id IN VARCHAR2,
scheme_name IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
GET_ENCODING
Returns a list of semicolon separated encodings (formats) for the scheme dbms_mgd_id_utl.get_encoding(
category_id IN VARCHAR2,
scheme_name IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
GET_JAVA_LOGGING_LEVEL
Returns the Java trace level of the logging level for tracing MGD dbms_mgd_id_utl.java_plsql_logging_level RETURN INTEGER;
SELECT dbms_mgd_id_utl.get_java_logging_level
FROM dual;
 
GET_PLSQL_LOGGING_LEVEL
Returns the PL/SQL trace level of the logging level for tracing mgd dbms_mgd_id_utl.get_plsql_logging_level RETURN INTEGER;
SELECT dbms_mgd_id_utl.get_plsql_logging_level
FROM dual;
 
GET_SCHEME_NAMES
Returns a list of semicolon separated scheme names for the specified category dbms_mgd_id_utl.get_scheme_names(category_id IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
GET_TDT_XML
Returns tag data translation XML for the specified scheme dbms_mgd_id_utl.get_tdt_xml(
category_id IN VARCHAR2,
scheme_name IN VARCHAR2)
RETURN CLOB;
TBD
 
GET_VALIDATOR
Returns the tag data translation schema dbms_mgd_id_utl.get_validator RETURN CLOB;
SELECT dbms_mgd_id_utl.get_validator
FROM dual;
 
REFRESH_CATEGORY
Refreshes the metadata information on the java stack for the specified category dbms_mgd_id_utl.refresh_category(category_id IN VARCHAR2);
exec dbms_mgd_id_utl.refresh_category('2');
 
REMOVE_CATEGORY
Removes a category. If version is null, all versions for this category will be removed.
Overload 1
dbms_mgd_id_utl.remove_category(
category_name    IN VARCHAR2,
category_version IN VARCHAR2);
exec dbms_mgd_id_utl.remove_category('EPC');
Overload 2 dbms_mgd_id_utl.remove_category(category_id IN VARCHAR2);
TBD
 
REMOVE_PROXY
Unset the host and port of the proxy server dbms_mgd_id_utl.remove_proxy;
exec dbms_mgd_id_utl.remove_proxy;
 
REMOVE_SCHEME
Removes a tag data translation scheme from a category dbms_mgd_id_utl.remove_scheme(
category_id IN VARCHAR2,
scheme_name IN VARCHAR2);
TBD
 
SET_JAVA_LOGGING_LEVEL
Sets the Java logging level for tracing mgd  returning the current trace level dbms_mgd_id_utl.set_plsql_logging_level(level IN INTEGER);
exec dbms_mgd_id_utl.set_plsql_logging_level(dbms_mgd_id_utl.logging_level_finest);
 
SET_PLSQL_LOGGING_LEVEL
Set the PL/SQL logging level for tracing mgd returning the current trace level dbms_mgd_id_utl.set_plsql_logging_level(level IN INTEGER);
exec dbms_mgd_id_utl.set_plsql_logging_level(dbms_mgd_id_utl.logging_level_finest);
 
SET_PROXY
Sets the host and port of the proxy server for internet access dbms_mgd_id_utl.set_proxy(
proxyHost IN VARCHAR2,
proxyPort IN VARCHAR2);
TBD
 
VALIDATE_SCHEME
Validates the input tag data translation xml against the tag tag data translation schema dbms_mgd_id_utl.validate_scheme(xmlScheme IN CLOB) RETURN VARCHAR2;
Usage documented in {ORACLE_HOME}/rdbms/admin/mgdtrg.sql

Related Topics
Built-in Functions
Built-in Packages
What's New In 19c
What's New In 20c-21c

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