Upgrading .NET CLR routines

Upgrading your existing .NET CLR routines involves managing the changes between Db2 11.5 and previous releases that impact these routines and verifying that they function as expected.

Before you begin

Attention: With the release of Db2® 11.5.9, support for Microsoft .Net common language runtime (CLR) routines is deprecated and might be removed in the future. If you are currently running routines that have a dependency on .NET CLR, rewrite the routine logic in a supported language and then recreate the routines.
  • Review the Upgrade essentials for routines to identify key changes that might apply to your .NET CLR routines.
  • Ensure that you have access to a Db2 version 11.5 server, including instances and databases. The Db2 server can be part of a testing environment.
  • Ensure that a supported version of the Microsoft .NET Framework software is installed on the Db2 server.
  • Perform the previous steps in the Upgrading routines task.

Procedure

To upgrade your .NET CLR routines to Db2 version 11.5:

  1. Connect to the Db2 version 11.5 database in which you defined the .NET CLR routines.
  2. If you created your .NET CLR routines with execution control mode UNSAFE and you are upgrading from pre-Db2 version 11.5 32-bit instance to Db2 version 11.5 64-bit instance, rebuild their source code using the compile and link options specified in bldrtn.bat, the Db2 sample script for building .NET CLR routines.

    If you upgraded your .NET Framework, you should also rebuild your .NET CLR routines.

  3. Deploy the routine assembly to the Db2 server in the same location specified by the EXTERNAL clause in the routine definition. The routines should function successfully, with no differences in between previous releases and Db2 version 11.5.

What to do next

After upgrading your .NET CLR routines, perform the remaining steps in the Upgrading routines task.