The create function statement allows keyword, exportable, that determines whether or not a function can be exported to a remote site. It does not specify that the function must be exported, it specifies only that the function may be exported. The syntax is:
create function sql_function_name sql_function_signature sql_properties external_java_reference sql_function_name ::= [[identifier1.]identifier2.]identifier3 sql_function_signature ::= ( [sql_parameters]) returns sql_datatype sql_parameters ::= sql_parameter [{, sql_parameter}...] sql_parameter ::= [parameter_mode] [sql_identifier] sql_datatype parameter_mode ::= in | out | inout sql_properties ::= [modifies sql data] | [dynamic result sets integer] | [deterministic | not deterministic ] | [returns null on null input | called on null input ] | [exportable] | language java | parameter style java external_java_reference ::= external name ’java_method_name [java_method_signature]’ java_method_name ::= java_class_name.method_identifier java_class_name ::= [packages.]class_identifier packages ::= package_identifier[.package_identifier]... package_identifier ::= java_identifier class_identifier ::= java_identifier method_identifier ::= java_identifier java_method_signature ::= ( [ java_parameters ]) java_parameters ::= java_datatype [{, java_datatype}...
When Component Integration Services encounters a SQL function, a check for the presence of the exportable keyword is made during the Component Integration Services query decomposition phase. If the function is exportable, the statement is a candidate for quickpass mode. If the function is not exportable, it causes the statement to be thrown out of quickpass mode.
In quickpass mode, the function name and argument list are forwarded to a remote server, even if the capability for Java UDF indicates that Java functions are not supported. This allows a Component Integration Services administrator to create packages of functions that, for example, emulate behavior of foreign database systems (Oracle, DB2, and so on). In this way, SQLJ functions can be created within Component Integration Services that allow Component Integration Services to forward statements in quickpass mode even though the function named in the query is not standard Transact-SQL.
If the statement containing the function cannot be forwarded to the remote server in quickpass mode, Component Integration Services still provides for the correct execution of the function by retrieving data from remote sites, then invoking the function locally to operate on the recently-fetched remote data.