dbms_transform.compute_transformation (
message IN "<ADT_1>",
transformation_schema IN VARCHAR2,
transformation_name IN VARCHAR2,
transformed_message OUT "<ADT_1>");
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);
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;