Migrating from IBM Db2 AI for z/OS 1.5.0 to IBM Db2 AI for z/OS 1.6.0
You can migrate your installation of IBM Db2 AI for z/OS from 1.5.0 to IBM Db2 AI for z/OS 1.6.0.
Before you begin
Important: If you have not already done so, you must apply the required Db2 APARs for your target Db2 connections prior to migrating to IBM Db2 AI for z/OS 1.6.0. See Hardware and software requirements for the Db2ZAI installation for a list of the required Db2 APARs.
Note: The migration process upgrades any Db2ZAI 1.5.0 maintenance level to the Db2ZAI 1.6.0 level.
Procedure
To migrate from IBM Db2 AI for z/OS 1.5.0 to IBM Db2 AI for z/OS 1.6.0:
- Complete the SMP/E installation of Db2ZAI 1.6.0, as documented in Installing the IBM Db2 AI for z/OS FMID.
- Db2ZAI 1.6.0 requires that IBM® z/OS maintenance be applied where Db2ZAI tasks run. See Hardware and software requirements for the Db2ZAI installation for a list of the z/OS PTFs to be applied.
- Db2ZAI 1.5.0 with PH50432 maintenance (or older), required four ports for started tasks and also used a random port to run the local Spark process under the Db2ZAI Liberty started task. For 1.6.0, Db2ZAI now requires one port for the ZAIND* started task and one port for the ZAILBTY started task, along with an additional range of ports for the ZAILBTY started task to run local Spark processes.
See the topic Assigning the Db2ZAI network ports to reassign and assign the Db2ZAI ports.
- Stop ML and stop Db2ZAI:
- Use the Db2ZAI user interface to stop ML on all target Db2 systems.
- Stop the Db2ZAI server processes (run $DB2ZAI_HOME/scripts/db2zai_services_stop, or stop using JCL). See Stopping the Liberty and Node.js servers with JCL or Stopping the Liberty and Node.js servers with USS.
- If MLz is used exclusively for Db2ZAI, you can stop it. You can also free the assigned ports for MLz after stopping the MLz address spaces.
- Update the DB2ZAI_INSTALLATION, BASH_HOME, PATH, and NODEJS_HOME environment variables in the .profile file:
- Set export for the NODEJS_HOME, DB2ZAI_INSTALLATION, BASH_HOME, and PATH environment variables. For example:
export DB2ZAI_INSTALLATION=/usr/lpp/IBM/db2zaiv1r6 #Note: Customize this directory for your environment export NODEJS_HOME=$DB2ZAI_INSTALLATION/nodejs export BASH_HOME=$DB2ZAI_INSTALLATION/bash #Note: Bash is provided by Db2ZAI in this directory export PATH=$NODEJS_HOME/bin:$BASH_HOME/bin:$PATH - (Optional) Back up the .profile file in case you need to fall back in the future.
- Set export for the NODEJS_HOME, DB2ZAI_INSTALLATION, BASH_HOME, and PATH environment variables. For example:
- If you start Db2ZAI from JCL, the procedures used to start Db2ZAI will need to be updated to the current versions located in the SCOYSAMP library.
- Upgrade Db2ZAI:
- (Optional) Back up the $DB2ZAI_HOME directory or the entire DB2ZAI_HOME zFS, as well as the Db2ZAI metadata database. See Backing up IBM Db2 AI for z/OS.
- Complete the initial customization of JCL include variables for batch jobs:
- Customize hlq.SCOYSAMP(COYIVMC). COYIVMC is included in multiple hlq.SCOYSAMP(COYU*) jobs.
- Run the batch jobs to upgrade the metadata Db2. Customize and run each of these jobs:
- COYU051A – create new objects and indexes.Note: This JCL job is required for Db2ZAI 1.5.0 APAR PH50432. If you ran this job previously, you don't need to run it again.
- COYU060A – update the catalog level of the Db2ZAI connection.
- COYU060B – clean up the WLP tables.
- COYU060C – update metadata catalog.
- COYU060D – reorg to remove pendings.
- COYGMSID – grant job for the Db2ZAI metadata scheduler ID.
Note:If you have multiple connections, you will need to resubmit COYU060A after modifying the CONNNAME in COYU060A to match the name of the target connection. For example, if you have two connections, you will need to edit this line, adding the first connection name and running the job then editing the line to add the second connection and running again:
//COYSYM0A SET CONNNAME=CONNNAME - COYU051A – create new objects and indexes.
- Run the update.sh script in $DB2ZAI_INSTALLATION/configuration/scripts to update the Db2ZAI configuration to the new version (config.json + script directory):
./update.sh migrate
- Upgrade the target Db2 catalog objects to the new version. Repeat these steps for each target Db2: Note: Apply the Db2 SMP/E PTF(s) listed in the Hardware and software requirements topic to the target Db2 subsystems to support this Db2ZAI maintenance. See Hardware and software requirements for the Db2ZAI installation.
- (Optional) Back up the existing target database. See Backing up IBM Db2 AI for z/OS.
- Complete the initial customization of JCL include variables for batch jobs:
- Customize hlq.SCOYSAMP(COYIVPC). COYIVPC is included in multiple hlq.SCOYSAMP(COYV*) jobs:
- Customize and run the batch jobs provided in hlq.SCOYSAMP.
- COYV051A – create new indexes and drop and recreate stored procedures and insert and update the data.Note: This JCL job is required for Db2ZAI 1.5.0 APAR PH47082. If you ran this job previously, you don't need to run it again.
- COYV051B – drop and recreate stored procedures.Note: This JCL job is required for Db2ZAI 1.5.0 APAR PH50432. If you ran this job previously, you don't need to run it again.
- COYV052A – drop and recreate stored procedures.Note: This JCL job is required for Db2ZAI 1.5.0 APAR PH50432. If you already ran this job previously, you don't need to run it again.
- COYV053A – drop and recreate stored procedures.
- COYV053B – drop and recreate stored procedures.
- COYV053C – new pivot information for system assessments.
- COYV053D – drop and recreate stored procedures.Note: The four JCL jobs above (COYV053A-D) are required for Db2ZAI 1.5.0 APAR PH51796. If you already ran these jobs previously, you don't need to run them again.
- COYV054A – Modify catalog objects.
- COYV054B – drop and recreate stored procedures.
- COYV054C – update new columns for SQL optimization.
- COYV054D – (Optional) run this job if you ran COYVIPC03 at installation time.
- COYV054E – reorg advisory pending objects.Note: The five JCL jobs above (COYV054A-E) are required for Db2ZAI 1.5.0 APAR PH53097. If you already ran these jobs previously, you don't need to run them again.
- COYV055A - add new columns.
- COYV055B - drop and recreate stored procedures.
- COYV055C - reorg advisory pending objects.Note: The three JCL jobs above (COYV055A-C) are required for Db2ZAI 1.5.0 APAR PH53099. If you already ran these jobs previously, you don't need to run them again.
- COYV056A - delete unused configuration variable.Note: The JCL job above (COYV056A) is required for Db2ZAI 1.5.0 APARs PH54584, PH56777, PH56807, and PH56843. If you already ran these jobs previously, you don't need to run them again.
- COYV057A – create new indexes.
- COYV057B – update stored procedures.Note: The JCL jobs above (COYV057A-B) are required for Db2ZAI 1.5.0 APAR PH56435. If you already ran these jobs previously, you don't need to run them again.
- COYV058A – update stored procedures.Note: The JCL job above (COYV058A) is required for Db2ZAI 1.5.0 APARs PH59095, PH59096, and PH60511. If you already ran this job previously, you don't need to run it again.
- COYV060A – update target connection catalog level.
- COYV060B – new target catalog.
- COYV060C – update predefined data.
- COYV060D – update procedures.
- COYV060E – migration of SQL optimization data.
- COYV060F – reorg to remove pendings.
- COYIPC04 – create alias for explain tables.Note: Before running COYIPC04, make sure that the SCHLERID in COYIVPC is set to the correct scheduler ID for the creation of connections and that the ID used to submit COYIPC04 has the privileges required to create an alias for the metadata scheduler ID.
- COYV051A – create new indexes and drop and recreate stored procedures and insert and update the data.
- Re-run the grant jobs for the various Db2ZAI users, including the Db2ZAI metadata administrator, the Db2ZAI target catalog administrator, the Db2ZAI target scheduler ID, and the Db2ZAI end users.
- Start the server processes at the new release level using the JCL PROC or from the USS script. See Starting the Liberty and Node.js servers with JCL or Starting the Liberty and Node.js servers with USS. Note: Make sure to update the current JCL PROC with the latest version or use a USS script to start the server processes.
- Restart ML on all target Db2 systems using the Db2ZAI user interface. Note: Following migration from 1.5.0 to 1.6.0, any SQL optimization packages that had multiple versions prior to migration will not initially appear in the SQL optimization user interface. No action is needed, as Db2ZAI will automatically relearn about those versions after migration.