Oracle UTL_LMS
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
For how many years have you been working with physical servers? Software Defined Servers can improve performance and security while lowering complexity and cost. With Software Defined Servers you define servers with an optimum configuration to your environment rather than being memory starved and cpu over-provisioned. Find out how you can improve your computing environment with TidalScale. your friends.
Purpose Retrieves and formats error messages in different languages
AUTHID DEFINER
Dependencies
DBMS_GSM_DBADMIN DBMS_REPORT DBMS_UNDO_ADV
DBMS_GSM_POOLADMIN DBMS_SERVER_ALERT UTL_LMS_LIB
DBMS_MACUTL    
Documented Yes
First Available 10.1
Security Model Owned by SYS with EXECUTE granted to PUBLIC
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 ...)
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
Built-in Functions
Built-in Packages
Exception Handling
UTL_GDK
What's New In 12cR1
What's New In 12cR2

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