CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle DBMS_REPUTIL
Version 11.1
 
General Information
Note: This package is deprecated but contains some interesting functionality ... shown below. No attempt has been made on this page to document all of the contents of this package. Just pieces that look particular interesting.
Source {ORACLE_HOME}/rdbms/admin/dbmsgen.sql
First Availability 11.1
Security Model Execute is granted to PUBLIC
 
GET_CONSTRAINT_NAME

Extracts a constraint name from an error message
dbms_reputil.get_constraint_name();
INSERT INTO servers (srvr_id) VALUES (1);

SELECT dbms_reputil.get_constraint_name('ORA-00001: unique constraint (UWCLASS.PK_SERVERS) violated')
FROM dual;
 
GLOBAL_NAME

Returns the database global name
dbms_reputil.global_name RETURN VARCHAR2
SELECT dbms_reputil.global_name
FROM dual;
 
RAW_TO_VARCHAR2

Returns a RAW
dbms_reputil.raw_to_varchar2(
r      IN  RAW,
offset IN  BINARY_INTEGER,
v      OUT VARCHAR2);
set serveroutput on

DECLARE
 outval VARCHAR2(20);
BEGIN
  dbms_reputil.raw_to_varchar2('0011', 1, outval);
  dbms_output.put_line(outval);
END;
/
 
SET_GLOBAL_NAME
In internal packages, Oracle doesn't want to call PL/SQL to set from_remote, hence, convert from_remote to a function clients are not supposed to assign values to this variable. If they do, use set_from_remote(flag) instead. Running this demo is dangerous. It is here for education purposes only. dbms_reputil.set_global_name(gdbname IN VARCHAR2);
exec dbms_reputil.set_global_name('TEST');
 
Related Topics
DBMS_UTILITY
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [275 users online]    © 2010 psoug.org