Oracle DBMS_TRANSFORM
Version 21c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Provides an interface to the message format transformation features of Advanced Queuing.
AUTHID CURRENT_USER
Dependencies
DBMS_ASSERT DBMS_STANDARD DBMS_UTILITY
DBMS_LOGREP_UTIL DBMS_TRANSFORM_INTERNAL UTL_RAW
DBMS_PRIV_CAPTURE DBMS_TRANS_LIB  
Documented Yes
First Available 9.0
Security Model Owned by SYS with EXECUTE granted to the AQ_ADMINISTRATOR_ROLE and AQ_USER_ROLE roles
Source {ORACLE_HOME}/rdbms/admin/dbmstxfm.sql
Subprograms
 
COMPUTE_TRANSFORMATION
Undocumented dbms_transform.compute_transformation (
message               IN  "<ADT_1>",
transformation_schema IN  VARCHAR2,
transformation_name   IN  VARCHAR2,
transformed_message   OUT "<ADT_1>");
TBD
 
CREATE_TRANSFORMATION
Creates a transformation that maps an object of the source type to an object of the destination type dbms_transform.create_transformation (
schema         IN VARCHAR2(30),
name           IN VARCHAR2(30),
from_schema    IN VARCHAR2(30),
from_type      IN VARCHAR2(30),
to_schema      IN VARCHAR2(30),
to_type        IN VARCHAR2(30),
transformation IN VARCHAR2(4000) DEFAULT NULL);
exec dbms_transform.create_transformation('SCOTT', 'MYMAP', 'SCOTT', 'CART_POINT', 'SCOTT', 'POLAR_POINT', 'function_name(parameter)');
 
DROP_TRANSFORMATION
Drop a transformation dbms_transform.drop_transformation(schema IN VARCHAR2(30), name IN VARCHAR2(30));
exec dbms_transform.drop_transformation('SCOTT', 'MYMAP');
 
MODIFY_TRANSFORMATION
Modify a transformation dbms_transform.modify_transformation (
schema           IN VARCHAR2(30),
name             IN VARCHAR2(30),
attribute_number IN NUMBER,
transformation   IN VARCHAR2(4000));
exec dbms_transform.modify_transformation('aqadmin', 'MYMAP', 2, 'function_name(parameter)');
 
Demo
DBMS_TRANSFORM (Demo from $ORACLE_HOME/rdbms/admin/exechae.sql); BEGIN
  sys.dbms_transform.create_transformation(schema => 'SYS', name => 'haen_txfm_obj',
from_schema => 'SYS', from_type => 'ALERT_TYPE', to_schema => 'SYS', to_type => 'VARCHAR2', transformation => 'sys.haen_txfm_text(source.user_data)');
EXCEPTION
  WHEN OTHERS THEN
    IF sqlcode = -24184 THEN
      NULL;
    ELSE
      RAISE;
  END IF;
END;
/

-- which references
CREATE OR REPLACE FUNCTION haen_txfm_text(message in sys.alert_type) RETURN VARCHAR2 IS
EXTERNAL
NAME "kpkhetp"
WITH CONTEXT
PARAMETERS(context, message, message indicator struct, RETURN OCISTRING)
LIBRARY DBMS_HAEVENTNOT_PRVT_LIB;

Related Topics
Built-in Functions
Built-in Packages
DBMS_AQ
DBMS_AQADM
DBMS_TRANSFORM_EXIMP
DBMS_TRANSFORM_EXIMP_INTERNAL
DBMS_TRANSFORM_INTERNAL
What's New In 21c
What's New In 23c

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