Upgrading scripts

Upgrading your existing scripts that use Db2® command line processor (CLP) commands, Db2 system commands or SQL statements involves managing the changes between version 11.5 and previous releases related to SQL statements, Db2 CLP and system commands, SQL Administrative views and routines, built-in functions, and catalog views.

Before you begin

  • Ensure that you have access to a Db2 version 11.5 server, including instances and databases.
  • Ensure that a Db2 version 11.5 client is installed.
  • Perform the previous steps in the upgrading database applications task.


This procedure only applies to scripts that use Db2 CLP commands, Db2 system commands or SQL statements.


To upgrade your scripts with Db2 CLP commands to Db2 version 11.5:

  1. Run your scripts to detect any incompatibilities with Db2 version 11.5. If your scripts run successfully, you do not need to perform any additional steps. However, consider performing the remaining steps to remove deprecated functionality in Db2 version 11.5 before they become discontinued or to use new command functionality.
  2. Remove the Db2 CLP and system commands that display or update registry variables and configuration parameters that are deprecated or discontinued:
  3. If your scripts perform snapshot or event monitoring, you need to modify your scripts to remove references to discontinued monitor elements or use a new name when they have been replaced by a new monitor element.
  4. Determine the upgrade impact from system catalog changes. Using the changed views and routines requires that you:
    • Change the view names on your queries.
    • Change column names in your queries for columns that have been renamed in the view or routine.
    • Remove column names from your queries for columns that are not available in the view or result sets from routines.
    • Replace * in your queries for a specific list of column names that you want to receive as a result set because the changed view result set has additional columns.
    • Change routines names and parameter names, and indicate new additional parameters.
    • Modify your script to process additional columns in a result set when calling a changed routine or querying a changed view that returns additional columns.

  5. Test your scripts to ensure that they run as expected using Db2 version 11.5.

What to do next

After upgrading your scripts, perform the remaining steps in the upgrading database applications task.