Oracle UTL_LMS
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. 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.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Retrieves and formats error messages in different languages
AUTHID DEFINER
Dependencies
DBMS_MACUTL DBMS_SERVER_ALERT UTL_LMS_LIB
DBMS_REPORT DBMS_UNDO_ADV WWV_FLOW_PLSQL_JOB
Documented Yes
First Available 10.1
Security Model Owned by SYS with EXECUTE granted to PUBLIC and APEX_040200 roles
Source {$ORACLE_HOME}/rdbms/admin/utllms.sql
Special Characters
Character Description
'%s' Substitute the next string argument
'%d' Substitute the next integer argument
'%%' Represents the special character %
Subprograms
 
FORMAT_MESSAGE
Formats a retrieved error message utl_lms.format_message(
format IN VARCHAR2 CHARACTER SET ANY_CS,
args   IN UNDEFINED)
RETURN VARCHAR2 CHARACTER SET format%CHARSET;
set serveroutput on

DECLARE
 s VARCHAR2(32767);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(26052,'rdbms','ora','french', s);

  dbms_output.put_line('before format, message is: ' || s);

  dbms_output.put_line('formatted message is: '||
  utl_lms.format_message(s, 96, 'my_string'));
END;
/
 
GET_MESSAGE
Retrieves an error message based on error number, product, facility, language, and message specified utl_lms.get_message(
errnum   IN  PLS_INTEGER,
product  IN  VARCHAR2,
facility IN  VARCHAR2,
language IN  VARCHAR2,
message  OUT NOCOPY VARCHAR2CHARCTER SET ANY_CS)
RETURN PLS_INTEGER;
set serveroutput on

DECLARE
 s VARCHAR2(200);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(601, 'rdbms', 'oci', 'English', s);
  dbms_output.put_line('English: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Spanish', s);
  dbms_output.put_line('Spanish: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Italian', s);
  dbms_output.put_line('Italian: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Dutch', s);
  dbms_output.put_line('Dutch: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'French', s);
  dbms_output.put_line('French: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'German', s);
  dbms_output.put_line('German: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Danish', s);
  dbms_output.put_line('Danish: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Norwegian', s);
  dbms_output.put_line('Norwegian: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Polish', s);
  dbms_output.put_line('Polish: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Swedish', s);
  dbms_output.put_line('Swedish: OCI--00601 is: ' || s);

  i := utl_lms.get_message(601, 'rdbms', 'oci', 'Turkish', s);
  dbms_output.put_line('Turkish: OCI--00601 is: ' || s);
END;
/

Related Topics
Exception Handling
Packages
UTL_GDK

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