DB2 10.5 for Linux, UNIX, and Windows

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 DB2 Version 10.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

Restrictions

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

Procedure

To upgrade your scripts with DB2 CLP commands to DB2 Version 10.5:

  1. Run your scripts to detect any incompatibilities with DB2 Version 10.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 10.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 10.5.

What to do next

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