DB2 10.5 for Linux, UNIX, and Windows

Upgrade essentials for routines

Upgrade essentials describe changes in application development support, changes to support new functionality, unsupported functionality, and deprecated functionality that might impact your routines.

The changes described in Upgrade essentials for database applications could also impact your routines.

Development software support
The information about development software support in Upgrade essentials for database applications applies to external stored procedures and user-defined functions (UDFs).
Implicit casting
After function invocation, the database manager must decide which function in a group of like-named functions is the "best fit". A comparison of the data types of the arguments with the defined data types of the parameters of the functions under consideration forms the basis for this decision. An untyped parameter marker or an untyped NULL constant argument accepts any parameter type as a best fit.

This change to support implicit casting impacts function resolution that involves modified system built-in functions and any new functions that you create using these arguments.

XML data is passed by reference in SQL routines

In SQL routines, when you assign XML data to input and output parameters of XML type or local variables of XML type, the XML data is now passed by reference. In previous releases, the XML data was passed by value in SQL procedures. Therefore, some operations using XML data in SQL procedures can return results that are different from the results returned by the same operations in previous releases.

Unfenced external routines

During database upgrade to DB2® Version 10.5 on Linux and UNIX operating systems, all external unfenced routines that have no dependency on the DB2 engine libraries (libdb2e.a or libdb2apie.a) are altered to FENCED and NOT THREADSAFE so you can safely run these routines under the new multithreaded database manager. Running external routines defined as NOT FENCED and THREADSAFE in the new multithreaded database manager that are not thread safe can yield incorrect results, database corruption, or abnormal termination of the database manager. Refer to Upgrading C, C++, and COBOL routines for details about how to manage this change.

31-bit external routines (Linux on zSeries)

All upgrade considerations for 32-bit external routines also apply to 31-bit external routines running on a DB2 database on Linux on zSeries.

Java™ external routines

The IBM® Software Developer's Kit (SDK) for Java 1.4.2 is deprecated and might be discontinued in a future release.

For DB2 Version 9.7 or later, the default JDBC driver to run JDBC routines is the IBM Data Server Driver for JDBC and SQLJ. See Upgrading Java routines for details on how to manage this change.