Monday, July 2, 2018

[DB2 on LINUX] DB2 9.7 to 10.5 upgrade detailed step by step process, ownership, and commands

My personal cheat sheet on DB2 10.5 standard upgrade procedure on LINUX_X64 platform.
A detailed guide on how to upgrade your old DB2 database from 9.7 to 10.5. Hope this helps new to DB2 administration with SAP.

An overview of what you are going to do:
1. Plan the upgrade and check the requirements.
2. Install the DB2 10.5 database software.
3. Upgrade the DB2 instance.
4. Upgrade the DB2 database.
5. Perform post-upgrade activities.

** Recommended DB2 10.5 version for future NetWeaver installation (7.3 onward) is (fix pack 7) supported until 2020
**Commands in blue
** It is recommended that you place your new 10.5 binaries or files in /db2//db2_v10.5

For a comperehensive look of the upgrade process you may refer to the attached.

Step # Action Duration
1.0 Schedule full backup of SAP DB2 database 120 DB2, Backup
2.0 Schedule full backup of DB2 host server File system 60 DB2, Backup
3.0 Perform backup of configuration of /db2/db2 30 DB2
4.1 Download DB2_LUW_10.5_LINUXX86_64 in SAPOSS
(fix pack 7)
Download DB2_LUW_10.5_CLIENT from SAPOSS
Download DB2 10.5 license OEM from SAPOSS
Download DB2 10.5 SAP_Note_1365982 for updated copy of and
Make sure you download the license for DB2 v10.5
120 DB2
4.2 Move downloaded file to /SAP_install directory and set permissions for db2 and mod 777 10 DB2
5.0 Provision additional 10GB lun for /db2/db2/db2_v105 60 Platform
6.0 Using new installer using "ROOT", install DB2 v10.5.1 to directory /db2/db2/db2_v105 by 
60 DB2
6.1 Installer - Confirm 11.1 Installation welcome page
6.2 Installer - Choose DB2 version 11.1 Workgroup, Enterprise  and Advance Edition
6.3 Installer - Confirm License Agreement
6.4 Installer - Select Installation Type - Typical
6.5 Installer - Select Install DB2 Server Edition on this computer
6.6 Installer - Choose Directory "/db2//db2_v105"
6.7 Installer - Select "Create DAS User later"
6.8 Installer - Select DO NOT create a DB2 instance
6.9 Installer - Select DO NOT setup your DB2 server to send notification at this time
6.10 DB2 installation Summary Copy Screen - Review entries and click "FINISH" to start Installation
7.0 Validate in OS level that there are 2 installation dir of DB2 by command db2ls | grep -I 5 DB2
8.0 Validate DB2 level to check new installation, as db2 execute db2level 5 DB2
9.0 Adjust ownership of new dir /db2/db2/db2_v105
 chggrp db2adm db2_v105, 

 chmod 775 db2_v105
10 DB2
10.0 Stop SAP SID 10 SAP
11.0 Stop DB2 (db2stop force; db2 force application null; db2_kill) DB2
12.0 Confirm no DB2 process is running in OS level DB2
13.0 RUN db2ckupgrade
As db2sid, run db2 start with parameter pointing to new DB2 v10.5.1 installation
db2start; db2 force application all; /db2//db2_v105/instance/db2ckupgrade -e -l upgrade.log
30 DB2
14.0 Validate upgrade.log and check if there are issues
cat upgrade.log
10 DB2
15.0 Disable client request
db2set -null DB2COMM
Restart DB2
db2stop force
10 DB2
16.0 Upgrade the actual instance
as ROOT, upgrade the instance
/db2//db2_v105/instance/db2iupgrade -u db2
60 DB2
17.0 Apply the license in the download software disk.
Go to the location of license file and execute db2licm -a db2aese_c.lic, execute
db2licm -a sam32.lic

10 DB2
18.0 Validate there is a valid license by db2licm -l as user db2 5 DB2
19.0 Check if DB2 runtime is installed. If no DB2 Runtime Client is installed, this command is unknown.
If a DB2 Runtime Client exists, the name of the local DB2 instance db2 is displayed.
Db2ilist as sidadm and db2sid
5 DB2
Upgrade the database
as db2sid, db2start
date; db2 upgrade database ;date
60 DB2
21.0 Enable Client Request
db2set DB2COMM=

Restart DB2 instance
db2stop force
15 DB2
Verify the database upgrade
db2 activate database
15 DB2
23.0 Check the SAP note download for post work of DB2 v10.5 30 DB2
24.0 Download the file needed. Can be done in download stage. Check the needed SAPNote number for DB2 v10.5.1 60 DB2
25.0 Check for latest version of
Use the latest 
15 DB2
26.1 Create the directory /usr/sap//SAP_Note_1365982. Place the db2 update files here 5 DB2
27.0 Run
./ -m -r -d
90 DB2
28.0 Set up the basic environments variable 10 DB2
29.0 check ‘db2rbind’ file. Validate there are '0' rebind 10 DB2
30.0 Adjust (clean up) ‘db2diaglog’ file 10 DB2
31.0 Update the DB2 CLI Driver
1. Backup db2cli.ini in /sapmnt/SID/global
2. Backup the directory /sapmnt/SID/global/db6 to old_backup_db6
3.Remove subdirectory ‘db6’
30 DB2
32.0 Go to newly downloaded CLIENT installer and run 30 DB2
33.0 Check for DB2 parameters adjustment needed in v10.5.
Implement the parameters
db2 update db cfg for using UTIL_HEAP_SZ 50000 AUTOMATIC
db2 update db cfg for using DECFLT_ROUNDING ROUND_HALF_UP
db2 update db cfg for using EXTENDED_ROW_SZ ENABLE
30 DB2
34.0 Restart database 10 DB2
35.0 Start SAP 5 DB2
36.0 Test DB2 backups if working correctly 60 DB2, Backup

No comments:

Post a Comment