Oracle DBMS_MGD_ID_UTL
Version 12.1.0.1

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Purpose Support utilities for Java such as setting the host and port of the proxy server for internet access.
Note To create the package start by moving to a non-root container and creating the user MGDSYS with mgdsys.sql as shown at page bottom.
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 Only STANDARD
Documented No
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.0.2
Security Model Owned by MGDSYS with no privileges granted.
Source {ORACLE_HOME}/rdbms/admin/mgdus.sql
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_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_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 dbms_mgd_id_utl.get_category_id('EPC')
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_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
 
Package Installation
Package Creation  
SQL> conn sys@pdborcl as sysdba
Enter password:
Connected.

SQL> @?/rdbms/admin/mgdsys
.. Creating MGDSYS schema

User created.

.. Granting permissions to MGDSYS

Grant succeeded.

Grant succeeded.

Grant succeeded.

Call completed.

Call completed.

Call completed.

Call completed.

Call completed.

Call completed.

SQL> @?/rdbms/admin/mgdus

SP2-0808: Package created with compilation warnings

Errors for PACKAGE DBMS_MGD_ID_UTL:

LINE/COL ERROR
-------- -----------------------------------------------------------------
60/11 PLW-05019: the language element near keyword RESTRICT_REFERENCES
is deprecated beginning with version 11.2

69/38 PLW-06010: keyword "LEVEL" used as a defined name
70/11 PLW-05019: the language element near keyword RESTRICT_REFERENCES
is deprecated beginning with version 11.2

88/36 PLW-06010: keyword "LEVEL" used as a defined name

SP2-0808: Package created with compilation warnings

Related Topics
Packages

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