Creating a function mapping for a specific data source type
You can create a mapping to a function for all data sources of a specific type.
Before you begin
The privileges held by the authorization ID of the statement must have SYSADM or DBADM authority.
About this task
Restrictions
You cannot override the existing function mappings or create new mappings for nonrelational data sources.
Procedure
To map a database function template to a data source function, use the CREATE FUNCTION MAPPING statement.
Example:
Map a database function template to an Oracle user-defined function
for all Oracle data sources
CREATE FUNCTION MAPPING MY_ORACLE_FUN1
FOR NOVA.STATS ( DOUBLE, DOUBLE )
SERVER TYPE ORACLE
OPTIONS (REMOTE_NAME 'STAR.STATISTICS')
The template is called STATS and belongs to a schema called NOVA. The Oracle user-defined function is called STATISTICS and belongs to a schema called STAR.