Sei sulla pagina 1di 57

<title>DB2 10.

5 FixPack 7 SAP Upgrade</title>


<h3>DB2 10.5 FixPack 7 SAP Upgrade</h3>
<xmp>

TE NOTE: This procedure is for upgrade from 10.1.x to 10.5 FP7SAP


If you are already running 10.5.1-4, then use the 10.5 FP7SAP patch
procedure

10.5 FP7SAP was released by SAP on 2/2/2016

It corrects a number of bugs that may lead to the transaction log UFS filling
up:

IT07968 IN SPECIFIC TIMING CONDITIONS, DB2READLOG API CALLS (USED E.G BYCDC)
MIGHT RESULT IN LOGS
BEING LEFT IN ACTIVE LOG PATH.
IT08728 DB2 MAY LEAK FILE HANDLES WHEN USING HADR, OR READLOG/QREP/CDC (OR
ANY LOG READER).
IT10707 WITH MULTIPLE DB2READLOG API CALLERS (HADR, CDC, ETC), LOG FILESMAY
NOT BE RENAMED RESULTING
IN PRIMARY LOG PATH TO FILL UP

Lines starting with '#' are comments and should not be executed.

Downloaded DB2 LUW 10.5 SAP OEM License (Note 816773) 67837800102000003237
DB2_LUW_10.5_FP7SAP_AIX_64bit_51050644_1.zip
DB2_LUW_10.5_FP7SAP_RDBMS_Client_51050647.zip
db6_update_client.SAR
db6_update_db.SAR

* TE NOTE: Be sure to unzip the SAP zip file on AIX, not Windows - Done one time.

The DB2 downloads have been loaded onto sap0505/sap0506 in /db2/db2cl1/10.5_FP5/


The media required for the Fixpack are extracted once and then scp'd to the
appropriate db2 accounts as needed.

TE NOTE: (Note 1837312 was reviewed before the start of the project)

Before you start the database upgrade, make sure that you read SAP Note
1837312. This SAP Note contains the most
recent information about the database upgrade, as well as corrections to this
document. Make sure that you always
have the most recent version of this SAP Note.

For a list of known errors and available fixes in DB2 Version 10.5, see also
SAP Note 1837312.

NOTE: DB2 10.5 is not supported for SAP system releases lower than SAP NetWeaver
7.0.

If you have an older SAP release, you must upgrade your SAP system to SAP
NetWeaver 7.0 or higher
before you can use DB2 10.5.

References:</xmp>
<p style="margin-left :2em;font-family:courier;"><pre>
n <a href="/DB2\DB6UpgrGuide10_5_upd.pdf" target="_blank">SAP DB2 10.5 Upgrade
Guide</a> DB2 10.5 SAP Upgrade Guide
<a href="./DB2 10.5 Standard Parameter Settings.htm">DB2 10.5 Standard Parameter
Settings</a> DB2 10.5 Standard Parameter Settings
U <a href="/sap_notes/DB2_0000101809.pdf" target="_blank">SAP Note 101809</a>
DB6: Supported Fix Packs DB2 for Linux, UNIX and Windows
<a href="https://websmp230.sap-ag.de/sap/support/notes/101809"
target="_blank">SAP Note 101809 (live)</a> DB6: Supported Fix Packs DB2 for Linux,
UNIX and Windows
n <a href="/sap_notes/DB2_0001837312.pdf" target="_blank">SAP Note 1837312</a>
DB6: Upgrade to Version 10.5 of DB2 for LUW
<a href="https://websmp230.sap-ag.de/sap/support/notes/1837312"
target="_blank">SAP Note 1837312 (live)</a> DB6: Upgrade to Version 10.5 of DB2 for
LUW
n <a href="/sap_notes/DB2_0001871003.pdf" target="_blank">SAP Note 1871003</a>
DB6: Installing Fix Packs for DB2 10.5 (UNIX + Linux)
U <a href="/sap_notes/DB2_0000019466.pdf" target="_blank">SAP Note 19466</a>
Downloading SAP kernel patches
n <a href="/sap_notes/DB2_0001851853.pdf" target="_blank">SAP Note 1851853</a>
Using DB2 10.5 with SAP applications
n <a href="/sap_notes/DB2_0000867976.pdf" target="_blank">SAP Note 867976</a>
Changing JDBC driver on WEB AS Java 6.40/NW 7.0x/7.1x
n <a href="/sap_notes/DB2_0000816773.pdf" target="_blank">SAP Note 816773</a>
DB6: Installing an SAP OEM license
U <a href="/sap_notes/DB2_0001365982.pdf" target="_blank">SAP Note 1365982</a>
DB6: Current db6_update_db/db6_update_client script (V49)
<a href="https://websmp230.sap-ag.de/sap/support/notes/1365982"
target="_blank">SAP Note 1365982 (live)</a> DB6: Current
db6_update_db/db6_update_client script (V49) (was V46 for 10.5.4)
<a href="/sap_notes/DB2_0001819734.pdf" target="_blank">SAP Note 1819734</a>
DB6: Use of BLU Acceleration
<a href="/sap_notes/DB2_0002177857.pdf" target="_blank">SAP Note 2177857</a>
DB6: Defect in DB2 BINSORT might cause misordered index in 9.7 FP10 or 10.5 FP5SAP

The attach SAR files had a newer db6_update_db.jar file - It was merged into the
distribution media.
There was no difference in the scripts.

# find . -name db6_update_db.* | xargs ls -ld


-r-xr-xr-x 1 db2bjx dbbjxadm 65790 Jan 21 08:23
./DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.jar
-r-xr-xr-x 1 db2bjx dbbjxadm 1641 Jan 21 08:23
./DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.sh

n <a href="/sap_notes/DB2_0002056603.pdf" target="_blank">SAP Note 2056603</a>


DB6: Seg fault on DB2 10.5 FP4 during connect processing
n <a href="/sap_notes/DB2_0002044772.pdf" target="_blank">SAP Note 2044772</a>
'SQL1344N Orphan rows' occurred while running DB2CKUPGRADE for version DB6 10.5
n <a href="/sap_notes/DB2_0000019466.pdf" target="_blank">SAP Note 19466</a>
Downloading SAP kernel patches
<a href="/sap_notes/DB2_0001697946.pdf" target="_blank">SAP Note 1697946</a>
DB6: Error in db2diag-log with db2exfmt in EWA
<a href="http://www-01.ibm.com/support/docview.wss?uid=swg27038033"
target="_blank">DB2 10.5 System Requirements</a> System requirements for IBM DB2
for Linux, UNIX, and Windows
<a href="http://www-01.ibm.com/support/docview.wss?
uid=swg21633449&myns=swgimgmt&mynp=OCSSEPGG&mync=E" target="_blank">Upgrade
Planning</a> Upgrading to DB2 Version 10.5 roadmap
<a href="http://www.ibm.com/support/docview.wss?uid=swg21649699"
target="_blank">swg21649699</a> The db2ckupgrade or db2iupgrade tools take a long
time to complete when upgrading to the DB2 v10.1 or v10.5 products

</pre></p><xmp>

===================================================================================
=============================
TE PREP STEPS
===================================================================================
=============================

[ ] Paperwork

Change Control Item


Remedy => Change Control -> (F2) New

Contact Network ID: TExxxxx


Contact Last Name :

Owning Org: GIO


Change Category: DATABASE
Change Environment: TEST
Change Type : RELEASE/UPGRADE
Description : DB2 Upgrade to 10.5.7 SAP, Mercury# 4046927
BJX sap0583
BHX sap0582
HRT sap0541
Tested : YES
Outage Expected : NO
Application Name : SAP

Halt OpenView Alerts: (x) NO

Include in Description -> Mercury Request#: 4046927

CC# DBs
---------- ----------------------
CC00258017 CS7, CS7-DR
CC00258300 BJX, BHX, HRT
CC00258569 BJS, BJD
CC00258666 HRD, BHD, HRZ, BHZ
CC00259058 HC3, BHQ
CC00259071 BJQ
CC00259956 BHS
CC00259903 HRS
CC00260010 BHC
CC00259903 HRS, BHS, HRC, BJC, HC2, BH2, BJ2

[ ] Remove old Fix Pack directories on the system being upgraded

DO NOT RUN ON CL1 - It is the source of all updates


===================================================

as root
set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

( ls -ld /db2/db2${sid}/FixPacks
ls -ld /db2/db2${sid}/FP4
ls -ld /db2/db2${sid}/10.5_FP4SAP
ls -ld /db2/db2${sid}/10.5_FP5
)

rm -r /db2/db2${sid}/FixPacks
rm -r /db2/db2${sid}/FP4
rm -r /db2/db2${sid}/10.5_FP4SAP
rm -r /db2/db2${sid}/10.5_FP5
etc

[ ] If you are upgrading a 10.5.4 system, clean up the old, old directories if they
still exist

# These directories can be removed, assuming we are not reverting the system
back to 10.1

as root

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

ls -ld /db2/db2${sid}/db2_software.old
ls -ld /db2/db2${sid}/sqllib_v101.old

rm -r /db2/db2${sid}/db2_software.old
rm -r /db2/db2${sid}/sqllib_v101.old

[ ] Confirm free space of 8G in the /db2/db2${sid} UFS

TE NOTE: You will need around 3465 MB free on the target server in
/db2/db2${sid} for 10.5 FP7SAP
The new DB2DIR will need 2485 MB in /db2/db2${sid}
The new sqllib will be 885 MB ( the old /db2/db2${sid}/sqllib is
saved in /db2/db2${sid}/sqllib_v101 )

*** A minimum of 6674 MB is needed in /db2/db2${sid}

sdf -f

jfs2 setting number of units 25165824 = 12G


29360128 = 14G
33554432 = 16G
37748736 = 18G <-
41943040 = 20G
46137344 = 22G

[ ] Copy the 10.5_FP7 Media from CL1 on sap0505/sap0506 ( run on the system to
upgraded as db2xxx )

note HADR: Copy to both the Primary and Standby DB


( unset LIBPATH
scp -o StrictHostKeyChecking=no -rp db2cl1@db2cl1:~/10.5_FP7SAP /db2/db2$
{sid}/
)

Amount of data to copy : 3,548 MB 10.5_FP7SAP

cd ~/10.5_FP7SAP
dir
drwxr-x--- 2 db2cl1 dbcl1adm 256 Jun 13 2012 DB2_10.5_license
drwxr-xr-x 3 db2cl1 dbcl1adm 4096 Jan 26 04:37
DB2_LUW_10.5_FP7SAP_RDBMS_AIX
drwxr-xr-x 3 db2cl1 dbcl1adm 4096 Feb 04 13:34
DB2_LUW_10.5_FP7SAP_RDBMS_AIX_CLIENT
drwxr-xr-x 2 db2cl1 dbcl1adm 256 Feb 09 09:18 SAR_Files

Confirm you have the updated jar file

find . -name db6_update_db.* | xargs ls -ld


-r-xr-xr-x 1 db2cl1 dbcl1adm 65790 Jan 21 08:23
./DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.jar
-r-xr-xr-x 1 db2cl1 dbcl1adm 1641 Jan 21 08:23
./DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.sh

# If needed, get the update from CL1


#
# chmod 755 /db2/db2$
{sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.*
#
# ( unset LIBPATH
# scp -o StrictHostKeyChecking=no -rp
db2cl1@db2cl1:~/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/db6_update_db.*
/db2/db2${sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/
# )

cd ~/10.5_FP7SAP/DB2_10.5_license
dir

total 24
-rw-r----- 1 db2bjd dbbjdadm 350 Aug 08 2013 README OEM
License.txt
-rw-r----- 1 db2bjd dbbjdadm 915 Aug 08 2013 db2aese_c.lic
-rw-r----- 1 db2bjd dbbjdadm 905 Aug 08 2013 sam32.lic

[ ] After the copy, re-confirm free space of 7G in the /db2/db2${sid} UFS

TE NOTE: The new DB2DIR will need 2725 MB in /db2/db2${sid}


The new sqllib will be 957 MB ( the old /db2/db2${sid}/sqllib is
saved in /db2/db2${sid}/sqllib_v101 )

*** A minimum of 3682 MB is needed in /db2/db2${sid}

sdf -f

[ ] Preupgrade Checks 10-60 minutes ( as db2xxx )


Check the install path under the db2xxx account

db2ls

Install Path Level Fix Pack Special Install Number


Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjx/db2_software 10.1.0.4 4
Tue Aug 5 11:44:14 2014 EDT 0

Note: DB2DIR represents the location where the DB2 copy is installed.

$ env | grep DB2DIR

DB2DIR=/db2/db2hc3/db2_software # if 10.1.x
or
DB2DIR=/db2/db2cs7/db2_V10.5 # if 10.5.4

TE NOTE: if db2ls shows 10.5.x , do the patch update, NOT THIS UPGRADE !

[ ] Run the db2prereqcheck ( as root : dzdo su - root)

# ID the sid by looking for the /db2/db2${sid} UFS

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

cd /db2/db2${sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/ESE/disk1

./db2prereqcheck -v 10.5.0.7

If everything check out you will see:

DBT3533I The db2prereqcheck utility has confirmed that all installation


prerequisites were met.

Have AIX admins make changes to UFSs if needed.

Don't worry about the uDAPL warning: we don't use pureScale

TE NOTE (pgw): /opt will not be used for the install location and can be
ignored

================================================================================

If you get the following error running the prereqcheck:


sap0549:root> ./db2prereqcheck -v 10.5.0.7
sh: prtconf: not found
DBT3516E The db2prereqcheck utility was unable to execute the
following command:
"LANG=C prtconf | grep "Processor Implementation Mode"
> /tmp/db2prereqcheck.25624706".
You need to add the path to module prtconf:
sap0549:root> whereis prtconf
prtconf: /usr/sbin/prtconf
sap0549:root> echo $PATH
/usr/bin:/bin
sap0549:root> PATH=$PATH:/usr/sbin
sap0549:root> echo $PATH
/usr/bin:/bin:/usr/sbin

[ ] Installation of the DB2 Software - about 20 minutes

HADR note: Install DB2 Software on both the Primary and the Standby DB servers

The installation of the DB2 10.5 software consists of the following steps that
you must perform in the
specified order:
1. You install the database software on the database server [
2. You update the database client software

Procedure

1. Log on to the database server as user root and make sure that you can open
programs with a
graphical user interface.

C:\>ipconfig/all | findstr IPv4


IPv4 Address. . . . . . . . . . . : 163.241.153.108(Preferred) # an example
only, your IP address will be different

dzdo su - root
set -a
TMOUT=0
DISPLAY=163.241.153.108:0 # an example only, your IP address will be
different
xclock # to test that your X display is working

2. Install the new media

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

cd /db2/db2${sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/ESE/disk1

./db2setup

3. # On the Welcome screen of the DB2 Setup Launchpad, choose Upgrade


Information and check
# if all operating system requirements are met.

# CAUTION You must make sure that the operating system requirements are met.

# Otherwise, the upgrade can fail.


TE NOTE: Already check with the db2prereqcheck check

4. Choose Install a Product ( as root )

5. Choose DB2 Version 10.5 Fix Pack 7 Workgroup, Enterprise and Advanced
Editions [Install New]

NOTE As of DB2 10.5, there is just one install image for the DB2 Workgroup,
Enterprise, and Advanced
Edition. The applied DB2 license decides which edition will actually be
used.

The following steps can appear, but not necessarily in the sequence shown
below. The exact sequence of the installation
steps that follow depends on various factors, for example, your operating
system, already installed DB2 components,
your installation choices, and the DB2 Fix Pack level. Therefore, we cannot
provide a detailed step-by-step procedure
for the DB2 software installation in this document. The following steps
outline important points that you have to consider
when installing DB2 in an SAP environment:

- On the Introduction part of the screen DB2 Setup . DB2 Server Edition,
choose [Next->]
- Software License Agreement
(x) I accept the terms in the license agreement and choose [Next->]
- On the screen Select the installation type, choose

TE NOTE: We ran into an issue with AIX Clustered Nodes running a new
release of the cluster
software.

lslpp -al | grep cluster.es.server # will report 7.1.3 or higher


on upgraded nodes
# 6.1.0.0 is the older
software release

(x) Custom

- On the screen Select installation, response file creation, or both,


choose
(x) Install DB2 Server Edition on this computer

- installation directory : enter the Installation Directory and choose Next.

TE NOTE : mkdir /db2/db2${sid}/db2_V10.5.7 # as db2xxx


chmod 755 /db2/db2${sid}/db2_V10.5.7
ls -ald /db2/db2${sid}/db2_V10.5.7 # use the out to paste in
the root Select the installation
# directory window. Press
F5 to double check free space.

- Select the features to install

[ View Features ]
[x] Server Support
[x] Base server support (required)
[x] Communication support - TCP/IP (required)
[x] Connect support (required)
[ ] DB2 Text Search
[x] DB2 data source support
[x] Guardium Installation Manager Client
[ ] Informix data source support
[x] Integrated Flash Copy Support
[ ] Spatial Extender server support
Uncheck -> [ ] Tivoli SA MP (installed)
IBM Tivoli System Automation for Multiplatforms provides high
availability
and disaster recovery capabilities for AIX, Line, Solaris
SPARC, and Windows.
This component is installed.

[x] Client Support


[x] Base client support (required)
[x] DB2 LDAP support
[x] Java support (required)
[x] SQL procedures (required)
[ ] Spatial Extender client
[x] Administrative tools
[x] DB2 Instance Setup wizard
[x] Replication tools (required)
[x] Application development tools
[ ] Base application development tools
[x] IBM Software Development Kit (SDK_ for Java(TM) (required_
[x] Getting Started
[x] First Steps
[x] Sample database source
[x] DB2 Update Service
[ ] Oracle data source support

TE NOTE: TRIED THIS, IT DIDN'T HELP


mv /usr/sbin/rsct/sapolicies/db2 /usr/sbin/rsct/sapolicies/db2.old

to see if it resolves this problem

- installation directory : enter the Installation Directory and choose Next.


Space required 2724 MB

TE NOTE : mkdir /db2/db2${sid}/db2_V10.5.7 # as db2xxx


chmod 755 /db2/db2${sid}/db2_V10.5.7
ls -ald /db2/db2${sid}/db2_V10.5.7 # use the out to paste in
the root Select the installation
# directory window

RECOMMENDATION We recommend that you do not use the default


installation paths for Linux and AIX, which
are as follows: ======

Linux: /opt/ibm/db2/V10.5 # Note that on Linux �ibm� is now


in lower case.
AIX, HP-UX, and Solaris: /opt/IBM/db2/V10.5

To check the location of the currently installed DB2 version, log on as


user db2<dbsid> and enter the
db2level command.

###################################################################################
####
CAUTION Do not install DB2 10.5 in the current instance directory of
your DB2 instance
(/db2/db2<dbsid>/sqllib) and below.

###################################################################################
####

and then [Next->]

- Select the languages to install (Custom)

[ English (required) ]

- Specify the location of the DB2 Information Center (Custom)

(x) On the IBM Web site

- On the Set User Information for the DB2 Administration Server screen,
choose the name of an existing DAS
user (typically dasusr1 or dasusr2), or enter the required information for
a new DAS user.

TE NOTE: We use dasadm

Set user information for the DB2 Administration Server

# if you are upgrading from 10.5.4

[x] Create DAS user later # this account is no longer needed and
is removed later

- On the Instance Setup screen, choose Do not create a DB2 instance and then
Next.

(x) Do not create a DB2 instance

- On the Set Up Notifications screen, choose Do not set up your DB2 server to
send notifications at this time.

(x) Do not set up your DB2 server to send notifications at this time

- On the Summary screen, review the installation summary and start the
installation by choosing [Finish].
Product to install: DB2 Server Edition
Installation type: Custom

Previously Installed Components:


Tivoli SA MP

Selected Components:
Base client support
Java support
SQL procedures
Base server support
Connect support
DB2 data source support
IBM Software Development Kit (SDK) for Java(TM)
DB2 LDAP support
DB2 Instance Setup wizard
Integrated Flash Copy Support
Communication support - TCP/IP
DB2 Update Service
Replication tools
Sample database source
First Steps
Guardium Installation Manager Client

Languages:
English
All Products

Target directory: /db2/db2bjd/db2_V10.5.7

Space required: 2724 MB


Install IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP):
No/Yes (BJS,BHD showed Yes, even though it was not selected)

- When the installation is completed, choose Finish again.

TE NOTE: under the Post-install steps you may see a note about TSAMP (we do
not use it)

The Tivoli SA MP is updated to a new level, if there is a existing


peer domain, please follow
the upgrade peer domain steps in DB2 Information Center to upgrade
the existing peer domains
before starting use it.

EXAMPLE LOG
======================================================================

Checking license agreement acceptance :.......Success


Installing DB2 file sets :.......Success
Installing or updating DB2 HA scripts for IBM Tivoli System Automation for
Multiplatforms (Tivoli SA MP) :.......Success
Executing control tasks :.......Success
Updating global registry :.......Success
Starting DB2 Fault Monitor :.......Success
Updating the db2ls and db2greg link :.......Success
Registering DB2 licenses :.......Success
Setting default global profile registry variables :.......Success
Initializing instance list :.......Success
Registering DB2 Update Service :.......Success
Updating global profile registry :.......Success

============================================================
DB2 Setup log file started at: Tue Feb 16 18:47:38 2016 EST
============================================================

Operating system information: AIX 7.1

Product to install: DB2 Server Edition


Installation type: Custom

Previously Installed Components:


Tivoli SA MP

Components to be updated or upgraded:


Tivoli SA MP

Selected Components:
Base client support
Java support
SQL procedures
Base server support
Connect support
DB2 data source support
IBM Software Development Kit (SDK) for Java(TM)
DB2 LDAP support
DB2 Instance Setup wizard
Integrated Flash Copy Support
Communication support - TCP/IP
DB2 Update Service
Replication tools
Sample database source
First Steps
Guardium Installation Manager Client

Languages:
English
All Products

Target directory: /db2/db2bjs/db2_V10.5.7

Space required: 2724 MB


Install IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP): Yes <-
Not sure why BJS,BHD did this, others were NO

Checking license agreement acceptance :.......Success


Installing: BASE_CLIENT_R

Installing: DB2_PRODUCT_MESSAGES_EN
Installing: BASE_CLIENT
Installing: JAVA_RUNTIME_SUPPORT
Installing: DB2_JAVA_HELP_EN
Installing: BASE_DB2_ENGINE_R
Installing: GSK
Installing: JAVA_SUPPORT
Installing: SQL_PROCEDURES
Installing: ICU_SUP
Installing: JAVA_COMMON_FILES
Installing: BASE_DB2_ENGINE
Installing: CONNECT_SUPPORT
Installing: DB2_DATA_SOURCE_SUPPORT
Installing: JDK
Installing: LDAP_EXPLOITATION
Installing: INSTANCE_SETUP_SUPPORT
Installing: ACS
Installing: COMMUNICATION_SUPPORT_TCPIP
Installing: DB2_UPDATE_SERVICE
Installing: DATABASE_PARTITIONING_SUPPORT
Installing: EDB
Installing: REPL_CLIENT
Installing: DB2_SAMPLE_DATABASE
Installing: ITLM
Installing: CLPPLUS
Installing: FIRST_STEPS
Installing: ESE_PRODUCT_SIGNATURE
Installing: GUARDIUM_INST_MNGR_CLIENT

Installing DB2 file sets :.......Success


DBI1110I The DB2 High Availability (HA) scripts for the IBM Tivoli
System Automation for Multiplatforms (SA MP) were successfully
updated in /usr/sbin/rsct/sapolicies/db2.

Explanation:

You need DB2 HA scripts to use SA MP with the DB2 HA feature.

These DB2 HA scripts are located at /usr/sbin/rsct/sapolicies/db2. The


DB2 installer detects whether these DB2 HA scripts need to be installed
or updated.

The DB2 installer successfully updated the DB2 HA scripts.

User response:

No action is required.

Installing or updating DB2 HA scripts for IBM Tivoli System Automation for
Multiplatforms (Tivoli SA MP) :.......Success
Executing control tasks :.......Success
Updating global registry :.......Success
Starting DB2 Fault Monitor :.......Success
Updating the db2ls and db2greg link :.......Success
Registering DB2 licenses :.......Success
Setting default global profile registry variables :.......Success
Initializing instance list :.......Success
Registering DB2 Update Service :.......Success
Updating global profile registry :.......Success
[ ] check db2ls

sap0530:db2ct1> db2ls

Install Path Level Fix Pack Special Install


Number Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

sap0596:db2cs7> echo $DB2DIR # Note the old version is still being used by
the DB

/db2/db2bjs/db2_software

[ ] Remove world writable from /db2 files which have it enabled [ dzdo su - root ]

find /db2 -type f -perm -002 2>/dev/null


find /db2 -type f -perm -002 2>/dev/null | xargs chmod o-w
find /db2 -type f -perm -002

find /db2 -type d -perm -002 2>/dev/null


find /db2 -type d -perm -002 2>/dev/null | xargs chmod o-w
find /db2 -type d -perm -002

[ ] Check the system catalog tablespace SYSCATSPACE

If SYSCATSPACE is not an AUTOEXTENT or an AUTOSTORAGE tablespace, you must


ensure that at least half
of the pages is free. To find out the number of used and free pages, use the
following command:

# db2 "LIST TABLESPACES SHOW DETAIL"

We use AUTOSTORAGE for all tablespaces, double check that AUTO=1 for
SYSCATSPACE ***

$ db_space | egrep "TAB_SPACE|SYSCATSPACE"

***
ID TAB_SPACE PG_SZ CONTAIN EXTSZ PRFTH PFEFF TYPE TSCTYPE FSC
TOT_MB USED_MB USED AUTO TABLES INDXS OBJCTS
0 SYSCATSPACE 16384 16 2 -1 32 DMS ANY NO
5408.00 5383.71 99.00 1 143 372 515

check USED_MB version 2G free on sapdata UFSs. They should be OK.


$ kk
Count 2000K extents available for
Unix File System CurAlloc CurFree 2G UnitsAv
---------------------- ---------- ---------- ----------
/db2/CS2/sapdata1 96000.00 74594.14 74000.00
/db2/CS2/sapdata2 96000.00 74594.15 74000.00
/db2/CS2/sapdata3 96000.00 74594.16 74000.00
/db2/CS2/sapdata4 96000.00 74594.20 74000.00
TOTAL 384000.00 298376.65 296000.00

[ ] Check the temporary tablespace

SAP systems use SMS-based temporary tablespaces. Make sure that the temporary
tablespaces can grow to
at least twice the size of SYSCATSPACE.

Our temp tablespace use the standard sapdata UFSs. They should be OK.

$ db_space | egrep "TAB_SPACE|TEMP"

ID TAB_SPACE PG_SZ CONTAIN EXTSZ PRFTH PFEFF TYPE TSCTYPE FSC


TOT_MB USED_MB USED AUTO TABLES INDXS OBJCTS
3 PSAPTEMP16 16384 16 2 -1 32 SMS SYSTEMP YES
0.25 0.25 100.00 1 0 0 0
4 SYSTOOLSTMPSPACE 16384 16 2 -1 32 SMS USRTEMP YES
0.25 0.25 100.00 1 0 0 0

[ ] Check the amount of log space available

Verify LOG_PRIMARY * LOGFILSIZ * 4KB > SYSCATSPACE TOT_MB

NOTE: As a rough guideline, make sure that your log space has at least the
size of the SYSCATSPACE. If you
followed the parameter recommendations for the database parameters
LOGFILESIZ, LOGPRIMARY and LOGSECOND
(for more information, see SAP Note 1692571), the upgrade should run
without problems.

###################################################################################
#######################
TE NOTE: SAP suggests 60 for LOGPRIMARY 0 for LOGSECOND, we use
LOGPRIMARY of 40, LOGSECOND of 40 for PR2
We disable NUM_LOG_SPAN (usually set to 20) later in this
procedure.

###################################################################################
#######################

[ ] cleanup old work around ( At this time, all systems should have be updated.
This is just a doublecheck. )

###################################################################################
########
# make sure DB2PATH is set and that db2set works

###################################################################################
########

as db2xxx

grep DB2PATH ~/.profile


env | grep DB2PATH
ls -al /global.reg # if it exists, it should be removed - see below

if it is not set

echo " " >> ~/.profile


echo DB2PATH=~/sqllib >> ~/.profile
echo export DB2PATH >> ~/.profile

tail -n 5 ~/.dbenv.sh
db2level | grep "10.5"
exit

if FP4 and /global.reg exists ( dzdo su - root )

ls -al /global.reg
rm /global.reg
ls -al /global.reg
exit

db2set should work at this time (as db2xxx)


===============================

db2set
env | grep DB2PATH

dir /global.reg # should not exist

[ ] Make sure DB2_ROWCOMPMODE_DEFAULT=ADAPTIVE

SAP NOTE: 1851853 - DB6: Using DB2 10.5 with SAP Applications

In DB2 10.1, you had to set the DB2 registry variable


DB2_ROWCOMPMODE_DEFAULT to ADAPTIVE if you
wanted to use adaptive compression as the default setting for COMPRESS YES
and thus as the default
setting for a fresh installation.

As of DB2 10.5, COMPRESS YES defaults to COMPRESS YES ADAPTIVE.

HADR Note: Not needed on the Standby

check rowcomp

db2set DB2_ROWCOMPMODE_DEFAULT=ADAPTIVE

# Look for tables using Static row compression

db_size -SC

# Update them to use Adaptive row compression


cd
db2 -tx "select substr('alter table \"'||trim(tabschema)||'\".\"'||
trim(tabname)||'\" compress yes adaptive;',1,180)
from syscat.tables where ( tabschema = 'SAPR3' or tabschema = 'SAPSR3'
or tabschema = 'SAPSR3DB' )
and rowcompmode = 'S' and type in ('T','U','H','L')
order by tabschema, tabname;" | tee temp.sql
db2 -t -vf temp.sql

# confirm the changes

db_size -SC

TE Note: Do not worry about SAPTOOLS using static compression

[ ] Check for LOADs in progress - Cannot run the update if any loads are active

HADR Note: Not needed on the Standby

time db2 "select tabname from SYSIBMADM.ADMINTABINFO where load_status is not


NULL"

0 record(s) selected # Should be returned

BJD real 0m26.67s


BJS real 1m6.29s
HRD real 34m8.11s
BHD real 6m48.26s
HRZ real 23m30.89
BHZ real 5m9.89s
BHQ real 13m36.29s
HC3 real 55m24.32s
BJQ real 0m44.76s
BHS real 1m40.04s
HRS real 26m13.48s
HRC real 27m25.74s
BHC real 5m21.20s
BJC real 0m17.65s
HC2 real 4m45.40s
BH2 real 4m21.36s
BJ2 real 0m20.20s

TE README NOTE:

# Long runtime of db2ckupgrade or db2iupgrade


# The tools db2ckupgrade and db2iupgrade (which calls db2ckupgrade
internally) perform a check that
# can run for a very long time. See the following IBM Technote for all
details and a possible
# workaround:
#
# http://www.ibm.com/support/docview.wss?uid=swg21649699
#
# Resolving the problem:
#
# APAR IC86755, sysrouted to IC94505,IC94506,IC94507 is a possible
permanent fix for the issue. The fix
# presented in the APAR requires both patch to the downlevel server,
as well as patching the db2ckupgrade
# tool from the target server.
#
# You can also use a temporary work around for the issue. Starting
with the v10.1 Fix Pack 3 and v10.5 Fix
# Pack 3 versions of the DB2 product, the db2ckupgrade and
db2iupgrade tools have an internal option , -b,
# which bypasses the check for tables in load pending state.
#
# Caution! The -b option should only be used after making sure there
are no tables in the database which
# are in the load pending state. If the database is upgraded and
there are tables in load pending state,
# then it is impossible to bring the table out of load pending state
after an upgrade. The only remedy is
# to restore the database from a backup to the downlevel server. You
can then bring the table out of the
# load pending state and upgrade the server.
#
# You can use the following code to verify that there are no tables
in load pending state:
#
# time db2 "select tabname from SYSIBMADM.ADMINTABINFO where
load_status is not NULL"
#
# Note: The -b option should only be used if ,the above query return
0 records. The query to ADMINTABINFO
# might take a long time, especially if the database is huge with
lots of objects. We are off-loading this
# query outside of the db2ckupgrade tool with the -b option, so the
db2iupgrade tool (which internally calls
# db2ckupgrade) run time will be reduced, thus shortening the
instance upgrade duration.
#
# One example of this phenomenon might look like the following:
#
# db2ckupgrade <dbname> -b -l <mylog.log> -u <userid> -p <password>
# db2iupgrade -b <myinstance>

[ ] Check the SAP Kernel Level. Must be at least 7.20

TE NOTE: on the Standby DBs make sure the SAP UFSs are mounted

1. Log in as <sapsid>adm
R3trans -x

R3trans loads the DB2 library and connects to the database. A log file
trans.log
is created in the current directory.

2. verify the db6_clidriver (CLI) driver is being used

######################################################################
TE NOTE: We do not use the DB2 Runtime Client on non-database servers.
######################################################################

grep patch trans.log | grep dbdb6slib

4 ETW000 [ dev trc,00000] Version of


'/usr/sap/DL3/SYS/exe/run/dbdb6slib.o' is "720.00", patchlevel (0.201) <- Current
Patch Level of DBSL
4 ETW000 [ dev trc,00000] DB6 shared library (dbdb6slib) patchlevels
45 0.506738

BJD "721.02", patchlevel (0.137)


BJS "721.02", patchlevel (0.137)
BJQ "721.02", patchlevel (0.137)

HRD "741.10", patchlevel (0.24)


BHD "721.02", patchlevel (0.137)

HRZ "741.10", patchlevel (0.24)


BHZ "721.02", patchlevel (0.137)

BHQ "721.02", patchlevel (0.137)


HC3 "741.10", patchlevel (0.24)

BHS "721.02", patchlevel (0.137)

HRS "741.10", patchlevel (0.24)


HRC "741.10", patchlevel (0.24)
BHC "721.02", patchlevel (0.137)
BJC "721.02", patchlevel (0.137)
HC2 "741.10", patchlevel (0.24)
BH2 "721.02", patchlevel (0.137)
BJ2 "720.00", patchlevel (0.112

3. Another verification

( disp+work -v | grep -i dbsl | grep version; disp+work -v | tail -n 1 )

DBSL shared library version 721.02


( 0.137) DB6: DROP INDEX to DROP CONSTRAINT (note 1911087)

TE NOTE: If not 7.20 or higher please have Basis update the SAP Kernel to at
least 7.20

***********************************************************************************
*********************************************
***********************************************************************************
*********************************************
PREP STEPS END HERE
***********************************************************************************
*********************************************
***********************************************************************************
*********************************************

Rechecks:
If you install the media in advance of the upgrade, double check the
requirements are still being met.

[ ] Run the db2prereqcheck ( as root : dzdo su - root)

# ID the sid by looking for the /db2/db2${sid} UFS

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

cd /db2/db2${sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64/ESE/disk1

./db2prereqcheck -v 10.5.0.7

[ ] Check for LOADs in progress - Cannot run the update if any loads are active

HADR Note: Not needed on the Standby

TE Note: This can be run a couple of hours before the upgrade.

time db2 "select tabname from SYSIBMADM.ADMINTABINFO where load_status is


not NULL"

[ ] Confirm Media is installed

db2ls

Install Path Level Fix Pack Special Install Number


Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

[ ] For DR Servers, verify that the SAP UFS are mounted

[ ] Double check the SAP Kernel Level is 7.20 or higher

( cd; R3trans -x; grep dbdb6slib trans.log | grep patch )

BJD "721.02", patchlevel (0.137)

( disp+work -v | grep -i dbsl | grep version; disp+work -v | tail -n 1 )

DBSL shared library version 721.02


( 0.137) DB6: DROP INDEX to DROP CONSTRAINT (note 1911087)

###################################################################################
###########################################
START OF THE DB2 DOWNTIME
###################################################################################
###########################################

[ ] Back Up the DB2 Server Configuration

During the upgrade, DB2 configuration parameters are changed automatically.


To keep track of the changes, we recommend that you back up
the DB2 server configuration before and after the actual upgrade. By
comparing the files that contain the DB2 configuration settings
after the upgrade has finished, you can review the changes.

TE NOTE: Backup the DB2 config

( as db2${sid} )

mkdir ~/cfg_backup_10.5.7
cd ~/cfg_backup_10.5.7
env | tee env_before_upg.txt
db2set -all | tee reg_before_upg.txt
db2 get dbm cfg | tee dbm_before_upg.txt
db2 get db cfg for $DB2DBDFT | tee db_before_upg.txt
db_space | tee db_space_before_upg.txt

After the database upgrade, you back up the database configuration again and
compare the files that contain the configuration before
and after the upgrade.

[ ] Disable the ATS Task scheduer

check DB2_ATS_ENABLE

Checking the Registry ...


[i] DB2_ATS_ENABLE=YES [DB2_WORKLOAD]

db2set DB2_ATS_ENABLE=NO -immediate


check DB2_ATS_ENABLE

[ ] Disable HADR on both the Primary and the Standby

# for the Primary

shutdown_DB2
db2start
db2 stop hadr on database $DB2DBDFT
DB20000I The STOP HADR ON DATABASE command completed successfully.

# for the Standby

shutdown_DB2
db2start
db2 stop hadr on database $DB2DBDFT
db2stop

TE NOTE: Do not roll forward until after the Primary DB has been upgraded

db2start
time db2 rollforward database $DB2DBDFT complete
DB20000I The ROLLFORWARD command completed successfully

CS7 real 1m24.09s

# Both

startup_DB2
check_hadr

[ ] Disable DB2COMM

db2set -null DB2COMM # disable client connections

[ ] Disable NUM_LOG_SPAN

db2 connect
db2 update db cfg for $DB2DBDFT using NUM_LOG_SPAN 0 immediate
db2 get db cfg for $DB2DBDFT show detail | grep NUM_LOG_SPAN

Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0


0

[ ] Stop the admin instance (if it exists). As a DAS user, enter the following
command:

TE NOTE: Only if you are upgrading from 10.1.x.x

su - dasadm

setenv sid `df | grep "/db2/db2" | awk '{ print substr($7,9)}'`


echo $sid

source /db2/db2${sid}/sqllib/db2cshrc

/db2/db2${sid}/db2_software/das/bin/db2admin stop

DB2ADMIN processing complete, SQLCODE = 4404

[ ] Shutdown the FMC ( as root : dzdo su - root)

update the /etc/inittab entry for the FMC

grep fmc /etc/inittab

change
fmc:2:respawn:/db2/db2ds1/db2_software/bin/db2fmcd #DB2 Fault Monitor
Coordinator
to
:fmc:1:respawn:/db2/db2ds1/db2_software/bin/db2fmcd #DB2 Fault Monitor
Coordinator

ps -ef | grep db2fmcd

kill -9 the fmc daemon db2fmcd # should not be needed


[ ] Shutdown DB2 ( and Standby if present *** )

TE NOTE: If you are updating the Primary or Standby of an HADR pair, you will
need to take them out of DR mode before proceding.
The HADR will have to be recreated when the upgrades on the Primary
and the Standby have completed.

disable crontab jobs (crontab -e)

shutdown_DB2

as root

ps -ef | grep sap


ps -ef | grep sap | awk '{ print $2 }' | xargs kill -9
ps -ef | grep sap

kill any leftover sap and db2 processes (everything except the topas_nmon)

ps -ef | grep db2 | grep -v grep| grep -v sh | grep -v tail


ps -ef | grep db2 | grep -v grep| grep -v sh | grep -v tail | awk '{ print
$2 }' | xargs kill -9
ps -ef | grep db_
ps -ef | grep db_ | awk '{ print $2 }' | xargs kill -9
ps -ef | grep db

db2diag -A # switch the diaglog for the upgrade

You must shut down all DB2 instances when you apply a Fix Pack.

In a non-pureScale environment, a single DB2 copy can drive many DB2 instances.

Therefore, you must stop all SAP systems and DB2 instances that are affected
before you
update a DB2 copy. To display a list of all DB2 instances that belong to a DB2
copy,
execute the command "db2ilist" as user db2<dbsid>.

/usr/sap/DAA # Solution Manager Diagnositic Agent

Note: Could not kill ctmadm tasks (controlM)

ctmadm 15401016 15990796 0 11:39:34 - 0:02


/opt/ctmadm/ctm/cm/SAP/JRE_64/bin/java -Xms32m -Xmx1024m ...
ctmadm 15990796 1 0 11:39:34 - 0:00 /bin/sh
./cm/SAP/exe/sapcmbe.sh start 0
root 24772770 1 0 12:01:15 - 0:00 /usr/bin/topas_nmon -f
-s 300 -c 13 -m /tmp/nmon -Z 10 ...

[ ] Take offline backup of the DB2 DB or snap the /db2 UFSs

HADR Note: Primary only

shutdown_DB2
db2start # needed for CommVault backup, do not startup if taking
CommVault snaps
* start the offline backup in CommVault ( retain 90 days W04-SPECIAL-90day )

[ ] Shutdown DB2

HADR Note: Both the Primary and the Standby

shutdown_DB2

###################################################################################
###########
[ ] Record Upgrade Time ( excluding the backups )

###################################################################################
###########

SID Start End Durataion


------ ---------------------------- ---------------------------- ---------
BJS Tue Feb 16 19:27:36 EST 2016 Tue Feb 16 21:57:19 EST 2016 02:29:43
BJD Thu Feb 18 14:27:14 EST 2016 Thu Feb 18 15:28:41 EST 2016 01:01:27
BJQ Fri Feb 26 10:30:12 EST 2016 Fri Feb 26 11:09:07 EST 2016 00:38:55

BHZ Fri Feb 19 16:16:38 EST 2016 Fri Feb 19 16:55:53 EST 2016 00:39:15
HRZ Fri Feb 19 17:09:34 EST 2016 Fri Feb 19 17:55:32 EST 2016 00:45:58
HRD Fri Feb 19 18:07:21 EST 2016 Fri Feb 19 19:02:51 EST 2016 00:55:30
BHD Fri Feb 19 18:07:21 EST 2016 Fri Feb 19 18:43:26 EST 2016 00:36:05

BHQ Thu Feb 25 16:13:27 EST 2016 Thu Feb 25 17:42:00 EST 2016 01:28:33
HC3 Thu Feb 25 19:23:46 EST 2016 Thu Feb 25 20:43:05 EST 2016 01:19:14
BHS Wed Mar 16 15:39:45 EDT 2016 Wed Mar 16 16:20:29 EDT 2016 00:40:44
BHC Thu Mar 17 15:54:20 EDT 2016 Thu Mar 17 16:38:09 EDT 2016 00:43:49
HRS Wed Mar 16 15:55:59 EDT 2016 Wed Mar 16 16:50:39 EDT 2016 00:54:40
HRC Thu Mar 17 15:55:38 EDT 2016 Thu Mar 17 17:04:29 EDT 2016 01:08:51
BJC Thu Mar 17 15:23:11 EDT 2016 Thu Mar 17 16:14:53 EDT 2016 00:51:42

time_diff 13:57:17 14:56:42

###################################################################################
###########################################
SAP Client Updates
###################################################################################
###########################################

HADR Note: The SAP Client Updates must be run on both the Primary and Standby DB
servers.
Upgrade the Standby only after Production has finished.

[ ] Verify that Basis has shutdown SAP

You may still see ctmadm and root topas_nmon tasks. These are not a problem.

ps -ef | grep sap

ctmadm 22610086 23986344 0 Jul 15 - 21:04


/opt/ctmadm/ctm/cm/SAP/JRE_64/bin/java -Xms32m -Xmx1024m -Djco.cpic_maxconv=2000
-Djco.trace_level=5 -Djco.trace_path=../../proclog
-Djava.library.path=/opt/ctmadm/ctm/./cm/SAP/exe/sapjco -classpath
/opt/ctmadm/ctm/./cm/SAP/exe/ctmsap.jar:/opt/ctmadm/ctm/./cm/SAP/exe/sapjco/sapjco3
.jar com.bmc.ctm.cmsap.exe.SAPstart 0
ctmadm 23986344 1 0 Jul 15 - 0:00 /bin/sh
./cm/SAP/exe/sapcmbe.sh start 0
root 13763802 1 0 21:01:12 - 0:00 /usr/bin/topas_nmon -f
-s 300 -c 13 -m /tmp/nmon -Z 10 -TAOPV^dM -youtput_dir=/tmp/nmon/sap0520
-ystart_time=21:01:07,Nov25,2014

as root

ps -ef | grep sap


ps -ef | grep sap | awk '{ print $2 }' | xargs kill -9
ps -ef | grep sap

If SAP is still running, have Basis shut it down (includeing the SAP OS
collector.

# Shut down the SAP system and the SAP database instance as follows:
#
# i) As user "<sapsid>adm", enter the following command:
# stopsap
# ii) Stop the SAP OS Collector with the following command:
# saposcol -k

[ ] Update the Database Client Software

1. Determining the DB2 Client Type used by the System

2. Log in as <sapsid>adm
R3trans -x

R3trans loads the DB2 library and connects to the database. A log file
trans.log
is created in the current directory.

3. verify the db6_clidriver (CLI) driver is being used

######################################################################
TE NOTE: We do not use the DB2 Runtime Client on non-database servers.
######################################################################

grep dbdb6slib trans.log | grep patch

4 ETW000 [ dev trc,00000] Version of


'/usr/sap/DL3/SYS/exe/run/dbdb6slib.o' is "720.00", patchlevel (0.201) <- Current
Patch Level of DBSL
4 ETW000 [ dev trc,00000] DB6 shared library (dbdb6slib) patchlevels
45 0.506738

NOTE: If not 7.20 or higher please have Basis update the SAP Kernel to at
least 7.20

BJS "721.02", patchlevel (0.137)


BJD "721.02", patchlevel (0.137)
BJQ "721.02", patchlevel (0.137)
BHZ "721.02", patchlevel (0.137)
HRZ "741.10", patchlevel (0.24)
BHD "721.02", patchlevel (0.137)
HRD "741.10", patchlevel (0.24)
BHQ "721.02", patchlevel (0.137)
HC3 "741.10", patchlevel (0.24)
BHS "721.02", patchlevel (0.137)
BJC "721.02", patchlevel (0.137)
HRS "741.10", patchlevel (0.24)
HRC "741.10", patchlevel (0.24)
BHC "721.02", patchlevel (0.137)
HC2 "741.10", patchlevel (0.24)
BH2 "721.02", patchlevel (0.137)
BJ2 "720.00", patchlevel (0.112)

NOTE Even if R3trans loads the DB2 CLI driver libraries, an additional DB2
Runtime Client might be installed. By default, the
SAP kernel uses the DB2 CLI driver on all application servers of SAP
Release 7.0 and higher that have a local DB2 Runtime
Client installed, as well as access to a DB2 CLI driver in directory
/usr/sap/<SAPSID>/SYS/global/db6. In this case, the
DB2 Runtime Client is not used, and we recommend that you uninstall it to
avoid duplicate maintenance.

# To check if a DB2 Runtime Client is installed, enter the following


command as user <sapsid>adm:
#
# $ db2ilist
#
# pwd: The file access permissions do not allow the specified action.
# pwd: The file access permissions do not allow the specified action.
# File /db2iutil not found.
# Exiting...

# 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<dbsid> is displayed. If you want to keep your DB2 Runtime
Client, we recommend that you update both DB2 clients
# (that is, the DB2 Runtime Client and the DB2 CLI driver).

# $ ksh
# $ whence db2ilist
# /db2/db2hrc/sqllib/bin/db2ilist <- part of DB2 install

3.1.2.2 Updating the DB2 Runtime Client - NOT NEEDED

For each SAP application server that uses a DB2 Runtime Client and that is
not running on the database server, you must update
the DB2 Runtime Client. That is, you install the DB2 Runtime Client software
first and upgrade the DB2 Runtime Client instance
as part of the database and instance upgrade.

######################################################################
TE NOTE: We do not use the DB2 Runtime Client on non-database servers.
######################################################################
[ ] Updating the DB2 CLI Driver

TE NOTE: Not needed on DR using NFS to serve the /sapmnt/SID and /usr/sap/SID
UFSs

PGW NOTE: CS7-DR has local mount points - did the client upgrade

sap0596:db2cs7> df | grep "/usr/sap"


/dev/usrsaplv 8388608 8386600 1% 16 1% /usr/sap
/dev/usrsapCS7lv 23592960 20310520 14% 15392 1% /usr/sap/CS7
/dev/usrsapdaalv 20447232 20443456 1% 4 1% /usr/sap/DAA

sap0596:db2cs7> df | grep "/sapmnt"


/dev/sapmntCS7lv 10485760 4813472 55% 3046 1% /sapmnt/CS7

For SAP systems that use the DB2 CLI driver, you only have to update the DB2
CLI driver once in the shared directory
/usr/sap/<SAPSID>/SYS/global/db6.
Each application server can access this directory. Therefore, after the DB2 CLI
driver has been updated, it can be used
by all application servers.

For more information and the latest version of the db6_update_client scripts,
see SAP Note 1365982.

We checked note 1365982: the scripts are the same as included with FP4SAP media
we downloaded

Result: The new version of the DB2 CLI driver is automatically used after the
next SAP system restart
and no further action is required.

as xxxadm
=========

# MAKE BACKUPS - note for Java only systems db6_blidriver will not exist

ksh
COLUMNS=132
cp -rp /usr/sap/${DB2DBDFT}/SYS/global/db6/AIX_64/db6_clidriver \
/usr/sap/$
{DB2DBDFT}/SYS/global/db6/AIX_64/db6_clidriver.pre10.5.7
cp -rp /usr/sap/${DB2DBDFT}/SYS/global/db6/jdbc \
/usr/sap/${DB2DBDFT}/SYS/global/db6/jdbc.pre10.5.7

NOTE on BJX : cp: /usr/sap/BJX/SYS/global/db6/AIX_64/db6_clidriver:


A file or directory in the path name does not exist.

# check the BACKUPs

ls -al /usr/sap/${DB2DBDFT}/SYS/global/db6/AIX_64/db6_clidriver
ls -al /usr/sap/$
{DB2DBDFT}/SYS/global/db6/AIX_64/db6_clidriver.pre10.5.7

ls -al /usr/sap/${DB2DBDFT}/SYS/global/db6/jdbc
ls -al /usr/sap/${DB2DBDFT}/SYS/global/db6/jdbc.pre10.5.7
exit # back to csh

# UPDATE THE CLIENTS

setenv sid `echo $DB2INSTANCE | awk '{ print substr($0,4) }'`


setenv SID `echo $DB2INSTANCE | awk '{ print substr(toupper($0),4) }'`
env | grep -i sid
db6level # should report 10.01.000x

(as db2xxx - next step only)

cp -r /db2/db2$
{sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX_CLIENT /tmp

# if you see a permission problem : chmod o+rx /db2/db2$


{sid}/10.5_FP7SAP (as db2xxx)

# continue xxxadm

cd /tmp/DB2_LUW_10.5_FP7SAP_RDBMS_AIX_CLIENT/CLIENT

./db6_update_client.sh -h

If you see wrong calling method for script please change directory
to the mounted SAP DVD and call the script from there

cp -p LABEL.ASC ../

*********************************************************
* this is db6_update_client.sh script version 0010 *
*********************************************************

For an ABAP or ABAP+Java system, start the db6_update_client.sh script


using the following command:
./db6_update_client.sh -u
For a Java-only system, use the following command to update only the
JDBC driver:
./db6_update_client.sh -j

./db6_update_client.sh -u

*********************************************************
* this is db6_update_client.sh script version 0008 *
*********************************************************

determined current OS where script is executed: AIX_64

source path: /tmp/DB2_LUW_10.5_FP7SAP_RDBMS_AIX_CLIENT/CLIENT


target path: /usr/sap/CS7/SYS/global/db6

#***************************************************************************#
# updating existing CLI drivers
#***************************************************************************#
directory /usr/sap/CS7/SYS/global/db6/AIX_64/db6_clidriver does
exist, deleting...
creating directory /usr/sap/CS7/SYS/global/db6/AIX_64/db6_clidriver
copying new CLI driver to
/usr/sap/CS7/SYS/global/db6/AIX_64/db6_clidriver

#***************************************************************************#
# copying JDBC driver

#***************************************************************************#
directory /usr/sap/CS7/SYS/global/db6/jdbc does exist, deleting
creating directory /usr/sap/CS7/SYS/global/db6/jdbc
copying new JDBC driver to /usr/sap/CS7/SYS/global/db6/jdbc

#***************************************************************************#
# create db2cli.ini

#***************************************************************************#
/usr/sap/CS7/SYS/global/db6/db2cli.ini does exist, nothing to do...
skipping creation of /usr/sap/CS7/SYS/global/db6/db2cli.ini

#***************************************************************************#

OR

./db6_update_client.sh -j # for Java-only systems (take this into


account)

The script "db6_update_client.sh" updates the DB2 CLI driver and the JDBC
driver for Java in the directory global/db6 for all available operating
systems.
The installation is now complete and you can restart your SAP system.

db6level # should be 10.05.0007 on ABAP systems, will still be


10.01.000x on Java systems

dir /usr/sap/${DB2DBDFT}/SYS/global/db6/AIX_64/db6_clidriver # for ABAP


systems

total 8
drwxr-xr-x 2 bhzadm sapsys 256 Jan 11 10:23 adm
drwxr-xr-x 2 bhzadm sapsys 256 Jan 11 10:23 bin
drwxr-xr-x 2 bhzadm sapsys 4096 Jan 11 10:23 bnd
drwxr-xr-x 2 bhzadm sapsys 256 Jan 11 10:23 cfg
drwxr-xr-x 2 bhzadm sapsys 256 Jan 11 10:23 cfgcache
drwxr-xr-x 4 bhzadm sapsys 256 Jan 11 10:23 conv
drwxr-xr-x 2 bhzadm sapsys 256 Jan 11 10:23 db2dump
drwxr-xr-x 3 bhzadm sapsys 256 Jan 11 10:23 lib
drwxr-xr-x 3 bhzadm sapsys 256 Jan 11 10:23 license
drwxr-xr-x 3 bhzadm sapsys 256 Jan 11 10:23 msg
dir /usr/sap/${DB2DBDFT}/SYS/global/db6/jdbc # for JAVA or ABAP/JAVE
systems

total 13048
-r-xr-xr-x 1 bjsadm sapsys 3235129 Feb 16 19:32 db2jcc.jar
-r-xr-xr-x 1 bjsadm sapsys 3433725 Feb 16 19:32
db2jcc4.jar
-r-xr-xr-x 1 bjsadm sapsys 1411 Feb 16 19:32
db2jcc_license_cu.jar
-rw-r--r-- 1 bjsadm sapsys 45 Feb 16 19:32
jdbcdriver.lst

as root

cd
rm -r /tmp/DB2_LUW_10.5_FP7SAP_RDBMS_AIX_CLIENT

[ ] Update the database shared library, DBSL (dbdb6slib.o) ( as xxxadm )

TE NOTE: If running 741.10 this step is not needed

***********************************************************************************
**************************
Issue with BPD:

sap0503:bpdadm 22> ls -al dbdb6slib.o


-rwxr-xr-x 1 bpdadm sapsys 5390554 Sep 09 2012 dbdb6slib.o

***********************************************************************************
**************************

Since a specific version of the database shared library (DBSL) dbdb6slib is


required for the SAP kernel,
make sure that you have applied the correct SAP kernel patch before you start
the database upgrade.
The following table shows the minimum DBSL version that is required:

SAP Kernel Release DBSL Patch Level


7.20 410
7.21 39
7.40 0

NOTE: For SAP kernel releases higher than the ones listed in this table, you
do not need a specific SAP kernel patch.

SAP RECOMMENDATION ***

We recommend that you install the latest available SAP kernel patch
before you start the DB2 upgrade.

To check the current patch level of DBSL:

cd
R3trans -x -w 10.5.7.log
grep patchlevel 10.5.7.log | grep dbdb6slib.o
4 ETW000 [ dev trc,00000] Version of
'/usr/sap/BJS/SYS/exe/uc/rs6000_64/dbdb6slib.o' is "721.02", patchlevel (0.137)

To check the current patch level of your DBSL, proceed as follows:

1. Log on to an application server as user <sapsid>adm.


2. Enter the following command:

( disp+work -v | grep "DBSL shared"; disp+work -v | tail -n 1 )

BJS DBSL shared library version 721.02


( 0.137) DB6: DROP INDEX to DROP CONSTRAINT (note 1911087)

The PR2 series dbdb6slib.o :


/tech/bas/kernels/DBSL_AIX_DB2_720_UNICODE_patch623/dbdb6slib.o
examples: DL3

The CS2 series dbdb6slib.o :


/tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325/dbdb6slib.o

The BHX series dbdb6slib.o :


/tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325/dbdb6slib.o

##########################################################
backup the DBSL
##########################################################

Some systems use dbdb6slib.o (7.20, 7.21) others use dbdb6slib.so with
(7.41)

.o file - the unlinked output of the compiler - an object file


.so - shared object library - created by the linker from .o files.
These shared libraries
are loaded into memory and accessed (all at one time) by lots
of processes in the system.
This saves memory.

# Note: BJx uses /usr/sap/${DB2DBDFT}/SYS/exe/run/dbdb6slib.o


# not /sapmnt/${DB2DBDFT}/exe

find /sapmnt/${DB2DBDFT}/exe -name "dbdb6slib*"

cd `find /sapmnt/${DB2DBDFT}/exe -name "dbdb6slib*" | head -n 1 | awk '{


j=match($0,"/dbdb6slib"); print substr($0,1,j-1) }'`
pwd

mv dbdb6slib.o dbdb6slib.o.PRE_10.5.7
mv patches.mf patches.mf.PRE_10.5.7

ls -al *.PRE_10.5.7
-rwxr-xr-x 1 bjsadm sapsys 5399911 Dec 04 2013
dbdb6slib.o.PRE_10.5.7
-rwxr-xr-x 1 bjsadm sapsys 329 Dec 04 2013
patches.mf.PRE_10.5.7
###################################################################################
#######################################
IF USING SAP 7.20

###################################################################################
#######################################

ls -al /tech/bas/kernels/DBSL_AIX_DB2_720_UNICODE_patch623

total 27340
drwxr-xr-x 2 60058 sapsys 96 Nov 19 15:40 .
drwxrwxr-x 131 9306 sapsys 9216 Nov 20 16:54 ..
-rw------- 1 60058 sapsys 4931 Sep 26 10:47
SIGNATURE.SMF
-rwxrwxr-x 1 60058 sapsys 13982562 Sep 23 13:45
dbdb6slib.o
-rwxrwxr-x 1 60058 sapsys 282 Sep 23 17:41 patches.mf

cd `find /sapmnt/${DB2DBDFT}/exe -name "dbdb6slib*" | head -n 1 | awk '{


j=match($0,"/dbdb6slib"); print substr($0,1,j-1) }'`
pwd

cp -p
/tech/bas/kernels/DBSL_AIX_DB2_720_UNICODE_patch623/dbdb6slib.o .
cp -p
/tech/bas/kernels/DBSL_AIX_DB2_720_UNICODE_patch623/patches.mf .

ls -al dbdb6slib.o*
-rwxrwxr-x 1 cs7adm sapsys 13982562 Sep 23 2014
dbdb6slib.o
-rwxrwxr-x 1 cs7adm sapsys 13982562 Sep 23 2014
dbdb6slib.o.PRE10.5.7
-rwxr-xr-x 1 cs7adm sapsys 8351412 Jan 27 08:50
dbdb6slib.o.SAVE
-rwxr-x--- 1 cs7adm sapsys 6874919 Jan 27 08:50
dbdb6slib.o_orig

ls -al patches*.mf*
-rwxrwxr-x 1 cs7adm sapsys 282 Sep 23 2014 patches.mf
-rwxrwxr-x 1 cs7adm sapsys 282 Sep 23 2014
patches.mf.PRE10.5.7
-rwxr-xr-x 1 cs7adm sapsys 282 Jan 27 08:50
patches.mf.SAVE

cd
R3trans -x
This is R3trans version 6.24 (release 721 - 10.06.14 - 20:14:07).
unicode enabled version
R3trans finished

grep dbdb6slib trans.log | grep patch

4 ETW000 [ dev trc,00000] Version of


'/usr/sap/DL3/SYS/exe/run/dbdb6slib.o' is "720.00", patchlevel (0.623)
4 ETW000 [ dev trc,00000] DB6 shared library (dbdb6slib)
patchlevels 31 0.026789
( disp+work -v | grep "DBSL shared"; disp+work -v | tail -n 1 )

DBSL shared library version 720.00


( 0.623) DB6: Global Compression Option without effect (note
2066163)

###################################################################################
#######################################
IF USING SAP 7.21

###################################################################################
#######################################

ls -al /tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325

total 6449
drwxr-xr-x 2 60058 sapsys 6 Nov 20 2014 .
drwxrwxr-x 137 9306 sapsys 138 Jun 16 06:24 ..
-rw------- 1 60058 sapsys 5014 Sep 15 2014
SIGNATURE.SMF
-rwxrwxr-x 1 60058 sapsys 7528420 Sep 12 2014 dbdb6slib.o
-rwxrwxr-x 1 60058 sapsys 313 Sep 13 2014 patches.mf
-rwxrwxr-x 1 60058 sapsys 332 Sep 13 2014
patchesdb.mf

cd `find /sapmnt/${DB2DBDFT}/exe -name "dbdb6slib*" | head -n 1 | awk '{


j=match($0,"/dbdb6slib"); print substr($0,1,j-1) }'`
pwd

cp -p /tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325/dbdb6slib.o .
cp -p /tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325/patches.mf .
cp -p /tech/bas/kernels/DBSL_AIX_DB2_721_UNICODE_patch325/patchesdb.mf .

dir dbdb6slib.*
-rwxrwxr-x 1 bjsadm sapsys 7528420 Sep 12 2014
dbdb6slib.o
-rwxr-xr-x 1 bjsadm sapsys 5399911 Dec 04 2013
dbdb6slib.o.PRE10.5.7
dir patches*
-rwxrwxr-x 1 bjsadm sapsys 313 Sep 13 2014
patches.mf
-rwxr-xr-x 1 bjsadm sapsys 329 Dec 04 2013
patches.mf.PRE10.5.7
-rwxrwxr-x 1 bjsadm sapsys 332 Sep 13 2014
patchesdb.mf

R3trans -x
This is R3trans version 6.24 (release 721 - 10.06.14 - 20:14:07).
unicode enabled version
R3trans finished (0012).

disp+work -v | grep "DBSL shared"


DBSL shared library version 721.02 <- looks the same
file dbdb6slib.o
dbdb6slib.o: 64-bit XCOFF executable or object module not stripped

R3trans -d
trans.log
4 ETW000 [ dev trc,00000] function DbSlExpFuns loaded from
library /usr/sap/CS2/SYS/exe/run/dbdb6slib.o
4 ETW000
18 0.003475
4 ETW000 [ dev trc,00000] Version of
'/usr/sap/CS2/SYS/exe/run/dbdb6slib.o' is "721.02", patchlevel (0.325)
4 ETW000
714 0.004189

###################################################################################
###########################################
Upgrade the DB2 Instance and the Database
###################################################################################
###########################################

HADR Note: On the Standby, update the Instance, but not the DB. It will be copied
from the Primary DB.

[ ] Confirm DB2 is down

shutdown_DB2

[ ] Upgrading the Instance 5 minutes ( as root - dzdo su - root )


===============================================================

As root (dzdo su - root)

# need 2000000 free in /tmp

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

cd /db2/db2${sid}/db2_V10.5.7/instance/

time ./db2iupgrade -b -u db2${sid} db2${sid} # use -b option

DBI1446I The db2iupgrade command is running.

DB2 installation is being initialized.

Total number of tasks to be performed: 4


Total estimated time for all tasks to be performed: 309 second(s)

Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end

Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end

Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end

Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end

The execution completed successfully.

For more information see the DB2 installation log at


"/tmp/db2iupgrade.log.25493618".
DBI1070I Program db2iupgrade completed successfully.

BJS real 3m29.48s


BJD real 2m39.40s
BHZ real 3m01.32s
HRZ real 4m44.02s
BHD real 3m29.10s
HRD real 5m31.55s
BHQ real 3m37.77s
HC3 real 5m54.09s
BJQ real 2m10.80s
BHS real 5m04.38s
BHC real 4m23.32s
HRS real 6m47.53s
HRC real 6m11.08s
BJC real 2m12.69s

su - db2${sid}
echo $DB2DIR
/db2/db2bjs/db2_V10.5.7

NOTE To check if all requirements for an upgrade are met, db2iupgrade calls
the program db2ckupgrade in the background.
If db2ckupgrade finds problems, the DB2 instance is not upgraded. In
this case, correct the problem and start
db2iupgrade again.

If the instance was successfully upgraded, the following message is


displayed:

Program db2iupgrade completed successfully.

The upgrade command saves a backup copy of the instance directory


~db2<dbsid>/sqllib to one of the following directories:
o ~db2<dbsid>/sqllib_v9
o ~db2<dbsid>/sqllib_v101

The files are then adapted in the ~db2<dbsid>/sqllib directory.


During the instance upgrade, the database manager configuration of DB2 10.5
is merged with the settings of the database
manager configuration of DB2 Version 9.7 or DB2 Version 10.1.

[ ] Upgrading the DB2 Database ( as db2xxx )

HADR Note: Upgrade the Primary and the Standby

Since the DB2 system catalog has been changed with DB2 Version 10.5, you have
to upgrade the database.

1. If you are logged into the db2xxx account, log out and then log back in.

2. Upgrade the database using the following commands:

echo $DB2DIR # verify DB2DIR is set correctly

/db2/db2bjs/db2_V10.5.7

db2start

SQL8007W There are "90" day(s) left in the evaluation period for the
product <- will update the license later
"DB2 Advanced Enterprise Server Edition". For evaluation license terms and

conditions, refer to the License Agreement document located in the license

directory in the installation path of this product. If you have licensed


this
product, ensure the license key is properly registered. You can register
the
license by using the db2licm command line utility. The license key can be
obtained from your licensed product CD.
02/16/2016 19:52:26 0 0 SQL1063N DB2START processing was
successful.
SQL1063N DB2START processing was successful.

time db2 upgrade database ${SID}

DB20000I The UPGRADE DATABASE command completed successfully.

BJS real 5m45.72s


BJD real 2m21.75s
BHZ real 6m37.68s
HRZ real 16m50.68s
BHD real 6m35.55s
HRD real 23m22.67s
BHQ real 14m45.75s
HC3 real 54m32.75s
BJQ real 1m58.11s
BHS real 11m43.19s
BHC real 9m35.19s
HRS real 18m30.07s
HRC real 19m32.15s
BJC real 2m36.98s

The time it takes to upgrade the database depends on the size of the system
catalog. For a standard SAP NetWeaver 7.0
ABAP only, the upgrade approximately takes 10 to 30 minutes. If the upgrade
completes successfully, the following message
is displayed:

The UPGRADE DATABASE command completed successfully.

NOTE If the database upgrade fails, the error message SQL1704N is displayed
describing the cause of the failure. For a
list of possible solutions for each reason code, enter

db2 "? SQL1704"

One of the most common causes of upgrade failure is that there is not
enough log file space available. In this case,
the following error is returned:

SQL1704N Database migration failed. Reason code "3".

NOTE If the database upgrade succeeds but additional actions are required,
the warning SQL1499W is displayed describing
the cause of the failure. In this case, see the DB2 administration
log /db2/<DBSID>/db2dump/db2<dbsid>.nfy for
more information.

startup_DB2

sap0520:db2cs2> db_sum

Instance Attachment Information

Instance server = DB2/AIX64 10.5.7


Authorization ID = DB2BJS
Local instance alias = DB2BJS

AGENTS:
DB2 Start Time Registerd Idle Waiting Register Top
Waiting Top From Pool Created Empty Pool Coord Top Max Overflows Stolen
-------------------------- ---------- ---------- ---------- ------------
----------- ---------- ------------------ ---------- ------------- ----------
2016-02-16-19.52.25.081194 13 0 0 13
0 28 15 13 0 0

Description Parameter Current Value


Delayed Value

-----------------------------------------------------------------------------------
----------------------------
Max number of coordinating agents (MAX_COORDAGENTS) = AUTOMATIC(200)
AUTOMATIC(200)
Max number of client connections (MAX_CONNECTIONS) =
AUTOMATIC(MAX_COORDAGENTS) AUTOMATIC(MAX_COORDAGENTS)

Install Path Level Fix Pack Special Install


Number Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

INSTANCE_MEMORY 2936012(4KB) 11468(MB)

[ ] Confirm the Patch Level as db2xxx

db2level

DB21085I This instance or install (instance name, where applicable: "db2bjs")

uses "64" bits and DB2 code release "SQL10057" with level identifier
"0608010E".
Informational tokens are "DB2 v10.5.0.7", "special_35127", "IP23949_35127",
and
Fix Pack "7".
Product is installed at "/db2/db2bjs/db2_V10.5.7".

db2ls

Install Path Level Fix Pack Special Install Number


Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

db2 connect to ${DB2DBDFT} # HADR Note: This will not work on the
Standby

Database Connection Information

Database server = DB2/AIX64 10.5.7


SQL authorization ID = DB2BJS
Local database alias = BJS

[ ] remove the one off patches for 10.1 FP2 (if they still exist)

remove one off patches for FP2

db2set | egrep -e "TCG_DEFAULT_OPTIONS|CORRELATED_PREDICATES"

db2set DB2_TCG_DEFAULT_OPTIONS=
db2set DB2_CORRELATED_PREDICATES=

update $CONFIG/db_specific_${SID}.sh

[ ] Set NUM_LOG_SPAN back to 20, 40 for BPP

db2 connect
db2 update db cfg for $DB2DBDFT using NUM_LOG_SPAN 20 immediate
db2 get db cfg for $DB2DBDFT show detail | grep NUM_LOG_SPAN
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 20
20

[ ] Verifying the Database Upgrade ( as db2xxx )

To verify the success of the database upgrade, you can test if a database
activation succeeds by performing
the following steps:

time db2val

DBI1379I The db2val command is running. This can take several minutes.

DBI1335I Installation file validation for the DB2 copy installed at


/db2/db2cs2/db2_V10.5 was successful.

DBI1339I The instance validation for the instance db2cs2 was


successful.

DBI1343I The db2val command completed successfully. For details, see


the log file /tmp/db2val-141120_214604.log.

BJS real 3m24.41s


BJD real 2m58.00s
BHZ real 3m29.20s
HRZ real 4m3.17s
BHD real 2m56.20s
HRD real 4m24.51s
BHQ real 3m28.83s
HC3 real 3m26.74s
BJQ real 2m52.35s
BHS real 4m28.23s
BHC real 3m54.83s
HRS real 2m51.81s
HRC real 3m9.44s
BJC real 2m54.16s

The DB2 copy validation tool verifies basic functions of a DB2 software
installation and generates a report
with its findings.

[ ] rename the old installation directories

db2ls

Install Path Level Fix Pack Special Install Number


Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

move the old software directory


mv /db2/db2${sid}/db2_software /db2/db2${sid}/db2_software.old

as db2xxx

db2ls
Install Path Level Fix Pack Special Install Number
Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

To reverse if needed:

mv /db2/db2${sid}/db2_software.old /db2/db2${sid}/db2_software
or
mv /db2/db2cs2/db2_V10.5.old /db2/db2cs2/db2_V10.5

db2ls

Install Path Level Fix Pack Special Install Number


Install Date Installer UID

-----------------------------------------------------------------------------------
----------------------------------
/db2/db2bjs/db2_software 10.1.0.2 2
Tue Feb 26 15:36:37 2013 EST 0
/db2/db2bjs/db2_V10.5.7 10.5.0.7 7 1
Tue Feb 16 19:02:10 2016 EST 0

as db2xxx

cd
mv sqllib_v101 sqllib_v101.old

[ ] Run the db6_update_db.sh Script

The db6_update_db script checks various settings and enables some features, for
example, the automatic resize function
for the tablespaces. The script also reorganizes the tables of the DB2 system
catalog, updates the statistics for
these tables, and rebinds all invalid packages.

The following scripts are available on the RDBMS DVD and as attachments to SAP
Note 1365982:

OS Platform Script Name


Linux and UNIX db6_update_db.sh

These steps have been run once and not needed again:

RECOMMENDATION We recommend that you use the latest version of these scripts
that are available in SAP Note 1365982.

Procedure
1. Download the latest version of the scripts from SAP Note 1365982.
2. To run the scripts, follow the instructions in SAP Note 1365982.

To determine the version of the db6_update_db script, call the script with
the option -V or -version.

Execute the db6_update_db.sh script:

cd ~/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64

./db6_update_db.sh -v

******************************************
db6_update_db tool version 52 <- verify the version
******************************************

The db6_update_db script checks various settings and enables some features,
for example, the automatic resize
function for the tablespaces. The script also reorganizes the tables of the
DB2 system catalog, updates the
statistics for these tables, and rebinds all invalid packages.

One time - download the attachments from note 1365982 version 62 Validity
13.01.2016 (DD.MM.YYYY)

I checked the note: 1365982 - DB6: Current


"db6_update_db/db6_update_client" script (V52)

TE NOTE: The latest version (52) is now included in our media


distribution.
NO OTHER ACTION NEEDED.

Run the script to generate the sql:

chmod 755 ~/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64


cd ~/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64

./db6_update_db.sh -d $DB2DBDFT

**************************************************
* db6_update_db tool version 46
**************************************************
db6_update_db was called in a post database update/upgrade scenario !!
Parameter DBSID used : CS2
This is a Fixpak Update!!
**************************************************
The detected DB2 release is: 100504
This system is a SAP Netweaver System !!
No SAP Roles exist on this database
**************************************************

Generate Script Header


OK
Enable autoresize for tablespaces
OK
Check and Create Bufferpool with minimal 16K pagesize
OK [SKIPPED]
Check and create SYSTOOLSPACE if required
OK [SKIPPED]
Check and create SYSTOOLSTMPSPACE if required
OK [SKIPPED]
Run db2upd tools according to release if required
OK
Adapt DB/DBM config if required

Set MON_ACT_METRICS to BASE


OK [SKIPPED]
Set MON_REQ_METRICS to BASE
OK [SKIPPED]
Set MON_OBJ_METRICS to EXTENDED
OK [SKIPPED]
Set MON_LOCKTIMEOUT to WITHOUT_HIST
OK [SKIPPED]
Set MON_DEADLOCK to WITHOUT_HIST
OK [SKIPPED]
Set NUM_IOCLEANERS, NUM_IOSERVERS, AVG_APPLS automatic
OK [SKIPPED]
Convert tablespaces to LARGE
OK [SKIPPED]
Set MAX_COORDAGENTS, NUM_POOLAGENTS, MAX_CONNECTIONS to
automatic OK [SKIPPED]
Set MON_HEAP_SZ to automatic
OK [SKIPPED]
Set APPLHEAPSZ, DBHEAP to automatic and AUTO_STMT_STATS ON
OK [SKIPPED]
Set AUTO_REVAL to DEFERRED
OK [SKIPPED]
Unset DB2 registry parameter DB2_MEM_TUNING_RANGE
OK [SKIPPED]
Turn on AUTO_MAINT, AUTO_TBL_MAINT, AUTO_RUNSTATS
OK [SKIPPED]
Set DB2 registry variable DB2_PMODEL_SETTINGS
OK [SKIPPED]
Invoke the db2sap libary
OK
adapt AUTOREORG policy XML file
OK
Handle DB2_WORKLOAD
OK [SKIPPED]
Rebind packages
OK
Establish sysdummy workaround
OK [SKIPPED]
Perform a reorg and runstats on the system catalog
OK [SKIPPED]
Grant EXECUTE on specific functions and SELECT for SYSIBMADM views
OK
Remove Cron-based scheduler
OK [SKIPPED]
Adapt eventmonitor tables
OK
Set Concurrency Threshold SYSDEFAULTCONCURRENT and Work Class
SYSMANAGEDQUERIES OK [SKIPPED]
User actions:
Check the generated SQL script (db6_update_db_out.sql) and execute it
as instance owner
in the following way: db2 -z db6_update_db_out.log -tvf
db6_update_db_out.sql
Finally check the logfile db6_update_db_out.log for errors !!!

The SQL0204N errors can be ignored. The proper bind command should
include the "sqlerror continue"

clause which will suppress the error messages from being displayed.

Check the entries in the file db6_update_db_out.log for error messages


and and correct any
errors that may have occurred (error messages in db2diaglog after the
release upgrade) that are
described in more detail in Note 1263266. Also refer to Note 1269713
for the error analysis of
the log file db6_update_db_out.log. This note describes SQL errors that
may occur during the
rebind of the packages, but that you can ignore.

Run the sql that was generated: ( about 2 minutes )

cd /db2/db2${sid}/10.5_FP7SAP/DB2_LUW_10.5_FP7SAP_RDBMS_AIX/AIX_64
time db2 -z db6_update_db_out.log -tvf db6_update_db_out.sql

DB20000I The TERMINATE command completed successfully.

LOCK CONTENTION ISSUE - before we added the disabling of ATS Task


Scheduler

===========================================================================

sap0565:db2bjs> db_locks -b

db_locks v1.0f May 19, 2014

Snap Timestamp Agent ID Client ClientPID Client Usr Lock


Name WaitTime TabSchema TabName
objType Mde CMd S Attr Cnt HldCnt Attributes
------------------- ---------- ---------- ---------- ------------
-------------------------------- -------- ---------------
-------------------------------- -------------------------------- ---- ---- - ----
------ ------ ----------------
02/16/16 21:25:52 61 - -1 -
00020009000000000000000054 0 SAPTOOLS QSTATS_SAP_WLM_STATISTICS
TABLE X W 000 0 0
Blocked by :
02/16/16 21:25:52 17 - -1 -
00020009000000000000000054 SAPTOOLS QSTATS_SAP_WLM_STATISTICS
TABLE IX G 000 1 1
02/16/16 21:25:52 18 - -1 -
00020009000000000000000054 SAPTOOLS QSTATS_SAP_WLM_STATISTICS
TABLE IX G 000 1 1
02/16/16 21:25:52 19 - -1 -
00020009000000000000000054 SAPTOOLS QSTATS_SAP_WLM_STATISTICS
TABLE IX G 000 1 1
02/16/16 21:25:52 20 - -1 -
00020009000000000000000054 SAPTOOLS QSTATS_SAP_WLM_STATISTICS
TABLE IX G 000 1 1
02/16/16 21:25:52 119 - -1 -
000000B4000000000005000852 0 SYSIBM SYSROUTINES
ROW S W 000 0 0
Blocked by :
02/16/16 21:25:52 97 sap0565 7143596 -
000000B4000000000005000852 SYSIBM SYSROUTINES
ROW X G 030 5 0
...
02/16/16 21:25:52 134 sap0565 9044120 -
000000B4000000000005000852 3351 SYSIBM SYSROUTINES
ROW S W 000 0 0
Blocked by :
02/16/16 21:25:52 97 sap0565 7143596 -
000000B4000000000005000852 SYSIBM SYSROUTINES
ROW X G 030 5 0

10 locks found
10 blocks found

db2 "force application (17,18,19,20)" # this didn't work

Snap Timestamp Agent ID Appl Name Appl ID


Appl Status Client Host Client PID Client User Client Appl
------------------- ---------- ----------------------
---------------------------------------- ----------- --------------- ----------
-------------- ---------------
2016-02-16-21.29.59 61 DB2ATS
*LOCAL.db2bjs.160217011508 LOCKWAIT 9044120

db2set | grep DB2_FMP_COMM_HEAPSZ

db2set DB2_FMP_COMM_HEAPSZ=0

sap0565:db2bjs> Ps db2acd # look for the Health Monitor process

db2bjs 9044120 10092714 0 19:52:26 - 0:00 db2acd

kill -9 9044120 # this didn't work either

db2set DB2_FMP_COMM_HEAPSZ=
db2set | grep DB2_FMP_COMM_HEAPSZ

db2 "force application (61)" # this cleared up the issue

2016-02-16-21.36.11.971614-300 I603796A373 LEVEL: Warning


PID : 13762772 TID : 258 PROC : db2sysc 0
INSTANCE: db2bjs NODE : 000
HOSTNAME: sap0565
EDUID : 258 EDUNAME: db2sysc 0
FUNCTION: DB2 UDB, base sys utilities, sqleRunSysCtlr, probe:7580
DATA #1 : String, 33 bytes
Health Monitor Process restarted.

BJS real 1h24m33.91s


BJD real 1m4.28s
BHZ real 1m18.94s
HRZ real 1m49.18s
BHD real 1m17.12s
HRD real 2m20.31s
BHQ real 2m10.99s
HC3 real 3m8.87s
BJQ real 1m29.53s
BHS real 2m14.19s
BHC real 2m21.11s
HRS real 1m28.45s
HRC real 1m51.76s
BJC real 1m16.09s

Review the log:

es db6_update_db_out.log

egrep -e "^DB2[0-9]" db6_update_db_out.log | grep -v successfully # looks


for Errors

egrep -e "SQL[0-9]" db6_update_db_out.log | grep -v SQL0204N # looks for


Errors

SQL1418W Changing the database configuration parameter DECFLT_ROUNDING


may
SQL0061W The binder is in progress.
SQL0595W Isolation level "NC" has been escalated to "UR".
SQL0595W Isolation level "NC" has been escalated to "UR".
SQL0091N Binding was ended with "0" errors and "28"
SQL0061W The binder is in progress.
SQL0091N Binding was ended with "0" errors and "0" warnings.
SQL0061W The binder is in progress.
SQL0091N Binding was ended with "0" errors and "0" warnings.
SQL0061W The binder is in progress.
SQL0091N Binding was ended with "0" errors and "0" warnings.

The SQL0204N errors can be ignored. The proper bind command should include
the "sqlerror continue"

clause which will suppress the error messages from being displayed.

Check the entries in the file db6_update_db_out.log for error messages and
and correct any
errors that may have occurred (error messages in db2diaglog after the
release upgrade) that are
described in more detail in Note 1263266. Also refer to Note 1269713 for
the error analysis of
the log file db6_update_db_out.log. This note describes SQL errors that may
occur during the
rebind of the packages, but that you can ignore.

from the diag.log


MESSAGE : ADM10515I The automatic maintenance policy "AUTO_REORG" has
been
updated in database "BPX". The policy options have been updated from
"Table Scope: TABSCHEMA NOT LIKE 'SYS%' AND (TABSCHEMA, TABNAME) NOT
IN (SELECT TABSCHEMA, TABNAME FROM SYSCAT.EVENTTABLES)
Reorganization options: Rebuild dictionary , Use temporary tablespace
Index Reorganization Mode: Online Reclaim Extents Size for Tables:
100000 KB Reclaim Extents Size for Index Objects: 50000 KB Table
size limit: 1000000 KB" to "Table Scope: TABSCHEMA NOT LIKE 'SYS%'
AND (TABSCHEMA, TABNAME) NOT IN (SELECT TABSCHEMA, TABNAME FROM
SYSCAT.EVENTTABLES) Reorganization options: Rebuild dictionary , Use
temporary tablespace Index Reorganization Mode: Online Number of
Index Pseudo Emptypage for Volatile Tables: 20 PAGES Reclaim Extents
Size for Tables: 100000 KB Reclaim Extents Size for Index Objects:
50000 KB Table size limit: 1 KB".

[ ] Install the DB2 License

After the database upgrade, you have to install the DB2 license.
Procedure
- If you are an SAP OEM customer, see SAP Note 816773 to install the license.
NOTE Multi-partition databases: Install the license on each database host
- If you purchased DB2 directly from IBM, contact your IBM sales
representative

cd ~/10.5_FP7SAP/DB2_10.5_license

sap0520:db2cs2> dir
-rw-r----- 1 db2cs2 dbcs2adm 350 Nov 20 19:57 README OEM
License.txt
-rw-r----- 1 db2cs2 dbcs2adm 915 Nov 20 19:57 db2aese_c.lic
-rw-r----- 1 db2cs2 dbcs2adm 905 Nov 20 19:57 sam32.lic

db2licm -l

Product name: "DB2 Advanced Enterprise Server


Edition"
License type: "Trial"
Expiry date: "02/17/2015"
Product identifier: "db2aese"
Version information: "10.5"

db2licm -a db2aese_c.lic

LIC1402I License added successfully.


LIC1426I This product is now licensed for use as outlined in your
License Agreement. USE OF THE PRODUCT CONSTITUTES
ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED
IN THE FOLLOWING DIRECTORY:
"/db2/db2cs2/db2_V10.5/license/en_US.iso88591"

db2licm -l

Product name: "DB2 Advanced Enterprise Server


Edition"
License type: "CPU Option"
Expiry date: "Permanent"
Product identifier: "db2aese"
Version information: "10.5"
Enforcement policy: "Soft Stop"

Note the following:The feature "DB2 Performance Optimization ESE" authorizes


the use of the
Workload Manager (WLM) only. Installation and operation of the DB2 Query
Patroller and of the
DB2 Performance Expert are not part of the license in situation 1. If you
also want to use
these products, you to obtain a special license from IBM.

[ ] Check the version

# This DB2 select does not show the patch

db2 "select VERSIONNUMBER, VERSION_TIMESTAMP,VERSIONBUILDLEVEL from


SYSIBM.SYSVERSIONS"

VERSIONNUMBER VERSION_TIMESTAMP VERSIONBUILDLEVEL


------------- -------------------------- ------------------------------
10010000 2013-02-19-03.33.40.881404 s120403
10050700 2016-02-16-19.53.06.366929 special_35127

# This DB2 command shows the patches

db2greg -dump

I,DB2,10.5.0.7,db2bjs,/db2/db2bjs/sqllib,,1,0,/db2/db2bjs/db2_V10.5.7,,
V,DB2GPRF,DB2INSTDEF,db2bjs,/db2/db2bjs/db2_V10.5.7,
S,DB2,10.5.0.7,/db2/db2bjs/db2_V10.5.7,-,,7,0,,1455670345,1

sap0582:db2bhx> ctime 1455670345


Clock = 1455670345
ctime = Tue Feb 16 19:52:25 2016

[ ] Enable the ATS Task scheduer

check DB2_ATS_ENABLE

Checking the Registry ...


[i] DB2_ATS_ENABLE=NO [O]

db2set DB2_ATS_ENABLE=
check DB2_ATS_ENABLE

Checking the Registry ...


[i] DB2_ATS_ENABLE=YES [DB2_WORKLOAD]

[ ] Restart the DB - switch diaglog

db2set DB2COMM=

check db2comm
Checking the Registry ...
[i] DB2COMM=TCPIP [DB2_WORKLOAD]
Checking the DBM Config ...
Checking the DB Config ...

db2diag -A

shutdown_DB2
startup_DB2

switch_logfile

[ ] Backing Up the DB2 Server Configuration After the Upgrade (Recommended)

If you created a backup of the DB2 server configuration before the upgrade, it
is useful to create another backup of
the configuration after the upgrade.

(as db2<sid>)

cd /db2/db2${sid}/cfg_backup_10.5.7
env | tee env_after_upg.txt
db2set -all | tee reg_after_upg.txt
db2 get dbm cfg | tee dbm_after_upg.txt
db2 get db cfg for $DB2DBDFT | tee db_after_upg.txt
db_space | tee db_space_after_upg.txt

diff -wb env_before_upg.txt env_after_upg.txt # a new LIBPATH -


works with SSH
diff -wb reg_before_upg.txt reg_after_upg.txt
diff -wb dbm_before_upg.txt dbm_after_upg.txt
diff -wb db_before_upg.txt db_after_upg.txt
diff -wb db_space_before_upg.txt db_space_after_upg.txt

Note especially:

< Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_EVEN


---
> Decimal floating point rounding mode (DECFLT_ROUNDING) = ROUND_HALF_UP
# new SAP default

< Current effective arch level (CUR_EFF_ARCH_LVL) = V:10 R:5 M:0 F:5
I:0 SB:0
< Current effective code level (CUR_EFF_CODE_LVL) = V:10 R:5 M:0 F:5
I:0 SB:34127
---
> Current effective arch level (CUR_EFF_ARCH_LVL) = V:10 R:5 M:0 F:7
I:0 SB:0
> Current effective code level (CUR_EFF_CODE_LVL) = V:10 R:5 M:0 F:7
I:0 SB:35127

TE Note: Tablespaces are changed from NO filesystem caching to NS (not


specified)
With NS, if you are using JFS2 UFSs then NO filesytem caching is used.
See: http://www-
01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/do
c/c0051304.html%23c0051304.dita?lang=en

[ ] enable the crontabs

HADR Note: Do not enable check_HADR.sh at this time, enable the


DR_rync_log_archive2 only after the DR system
has been upgraded

## 2,12,22,32,42,52 * * * * ~/db2sa/scripts/check_HADR.sh >


~/db2sa/scripts/check_HADR.log 2>&1
## 2,7,12,17,22,27,32,37,42,47,52,57 * * * *
~/db2sa/scripts/DR_rsync_log_archive2.sh >
~/db2sa/scripts/DR_rsync_log_archive2.log 2>&1

HADR Note: do not enable check_Stanby.sh at this time

## 2,12,22,32,42,52 * * * * ~/db2sa/scripts/check_Standby.sh >


~/db2sa/scripts/check_Standby.log 2>&1

Activate the crontab jobs

crontab /var/spool/cron/crontabs/db2${sid}

[ ] as xxxadm check connectivity

# TE NOTE : R3trans will fail on Java only systems

cd
R3trans -d
db2 connect
db6level

10.05.0007

[ ] Record your end time

###################################################################################
###########################################
END OF THE ACTUAL UPGRADE
###################################################################################
###########################################

[ ] Performing a Backup

You will need to have the OPS window removed from the CV Client. (It does not
need to be put back on)

CAUTION We strongly recommend that you perform a full offline backup of the
upgraded database.

HADR Note: We will need an offline or online backup in production for the
establishment of the DR system.
When the backup completes:
Mark all tapes it used as FULL
View Media
Properties for each tape

Disable offsite movement of the tapes

***********************************************************************************
*
[ ] If this is an HADR node, you must recreate the standby after upgrading it's
software

***********************************************************************************
*

See HADR notes for additional details.


Can be run in parallel with the rest of the steps.

Restore HOT Backup of $SID to $SID-DR

CV-GUI
Look at the backup history for ${SID}HOT in SAP${SID}
right click browse and restore
[ Browse and Restore Options ] [ View Content ]
Select [x] CS7 in the left pane
[Recovery All Selected ...]
General : (x) Database Subset
Destination Computer: SAP${SID}-AIX-DR
Restore Arguments
(x) Offline Restore
Select the Available Image
Go back to General:
(x) Entire Database
[ Advanced ]
[ Rollforward ]
[ ] Disable Roll-Forward
[x] Leave in Roll-forward Pending State
[ Log Files ]
[ ] Restore Log Files (uncheck)

* shutdown_DB2 on the standby


* db2start on the standby

[OK] Execute the restore

While the restore is running copy the archive logs

~/db2sa/scripts/DR_rsync_log_archive2.sh

When the restore is done:

on Standby
==========

db2 rollforward db $DB2DBDFT query status


Rollforward Status

Input database alias = CS7


Number of members have returned status = 1

Member ID = 0
Rollforward status = DB pending <--
Should be in pending mode
Next log file to be read = S0007866.LOG
Log files processed = -
Last committed transaction = 2015-01-29-01.28.33.000000 UTC

Put the standby into standby mode

shutdown_DB2
# Kill the restore if it is in rollforward mode
db2start
db2 start hadr on database $DB2DBDFT as standby

Set up the Primary


==================

Make sure all the secondary archives LOGs are copied from the primary to the
standby

Startup the Primary

db2 start hadr on database $DB2DBDFT as primary

DB20000I The START HADR ON DATABASE command completed successfully.

Verify the DB is in Primary mode

db2pd -db $DB2DBDFT -hadr


or
check_hadr

[ ] Remove the Database Administration Server

The database administration server (DAS) is required by the graphical DB2


administration tools, for example, the
DB2 Control Center. As of DB2 10.1, the DB2 Control Center has been
discontinued. To perform administration tasks
for your database, we recommend that you use the DBA Cockpit (SAP transaction
DBACOCKPIT).

Procedure Linux and UNIX


1. Log on to the database server as user db2<dbsid>.
2. Initialize the DAS environment by running one of the following scripts:

For Bourne or Korn shell, enter the following command:.


<DASHOME>/das/dasprofile
For C shell, enter the following command:source <DASHOME>/das/dascshrc

$ . /home/dasadm/das/dasprofile
Replace <DASHOME> with the home directory of the DAS user, for example,
/home/dasusr1.

3. Stop the DAS using the following command:

$DB2DIR/das/bin/db2admin stop

4. Log off as user db2<dbsid>.


5. Log on again as user root.
6. Remove the DAS using the following command (as root)

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

/db2/db2${sid}/db2_V10.5.7/instance/dasdrop

DBI1070I Program dasdrop completed successfully.


or
DBI1104E The Administration Server cannot be dropped.

Explanation:

An attempt to drop the Administration Server failed. The system detects


that the Administration Server does not exist.

[ ] Check DB2 parameters

log_config

cd $CONFIG
check_config.sh | grep -i match

DBM CFG: COMM_EXIT_LIST Current Value: "", Standard Value:


"NULL" <<<<<<<<<<<<<<<< *** DOESN'T MATCH ***
DB CFG: BUFFPAGE Current Value: "50000", Standard
Value: "10000" <<<<<<<<<<<<<<< *** NO match ***
DB CFG: INDEXSORT Current Value: "20", Standard
Value: "YES" <<<<<<<<<<<<<<< *** NO match ***
DB CFG: AUTO_STATS_PROF Current Value: "ON", Standard
Value: "OFF" <<<<<<<<<<<<<<< *** NO match ***
DB CFG: AUTO_PROF_UPD Current Value: "ON", Standard
Value: "OFF" <<<<<<<<<<<<<<< *** NO match ***
DBM CFG: using Current Value: "", DB Specific
Value: "INSTANCE_MEMORY" <<<<<<<<<<<<<<<< *** NO match ***

[ ] Comment out fmc in /etc/inittab - Use a ":" ( as root )

grep fmc /etc/inittab

[ ] The following SAP tools for DB2 require a specific patch level to be able to
work with DB2 10.5 ( as xxxadm )

Tool Min Patch Level We install with 7.20 721 SAP install uses 720 721
741
-------- ----====------- -------------------- -------------------- ---- ---
---
dmdb6bkp 16 16 16 15 16
16
brdb6brt 27 32 29 25 32
32

dmdb6bkp -V | grep "patch level"


brdb6brt -V | grep "patch level"

For more information about how to download and apply the latest kernel patch for
these tools, see SAP Note 19466.

# TE NOTE: Should be good, just double check , if not, the SAP KERNEL has not
been updated yet

dmdb6bkp -V | grep "patch level"


brdb6brt -V | grep "patch level"

Tool Patch Level


dmdb6bkp 16 ( /usr/sap/${SID}/SYS/exe/run/dmdb6bkp )
dmdb6bkp -V | grep patch
should be 16 after the upgrade
brdb6brt 27 ( /usr/sap/${SID}/SYS/exe/run/brdb6brt )
brdb6brt -V | grep patch
should be 29 after the upgrade

For more information about how to download and apply the latest kernel patch for
these tools, see SAP Note 19466.

###############################
check on the DBSL release level
###############################

disp+work -v | grep "DBSL shared"

###################################################################################
#######################################
IF USING SAP 7.20

###################################################################################
#######################################

dir /tech/bas/kernels/DMDB6BKP_720_AIX_DB2_patch16

total 3124
-rw------- 1 60058 sapsys 4928 Jun 07 2012 SIGNATURE.SMF
-rwxrwxr-x 1 60058 sapsys 1592836 Jun 06 2012 dmdb6bkp
-rwxrwxr-x 1 60058 sapsys 282 Jun 06 2012 patches.mf

/tech/bas/kernels/DMDB6BKP_720_AIX_DB2_patch16/dmdb6bkp -V | grep "patch


level"
patch level 16

as ( xxxadm )

cp -p /usr/sap/${DB2DBDFT}/SYS/exe/run/dmdb6bkp /usr/sap/$
{DB2DBDFT}/SYS/exe/run/dmdb6bkp.SAVE
cp -p /tech/bas/kernels/DMDB6BKP_720_AIX_DB2_patch16/dmdb6bkp /usr/sap/$
{DB2DBDFT}/SYS/exe/run/dmdb6bkp
dmdb6bkp -V | grep "patch level"

patch level 16

dir /tech/bas/kernels/BRDB6BRT_720_AIX_DB2_patch32

total 2370
-rw------- 1 60058 sapsys 4928 Apr 02 2014 SIGNATURE.SMF
-rwxrwxr-x 1 60058 sapsys 1206375 Mar 29 2014 brdb6brt
-rwxrwxr-x 1 60058 sapsys 282 Apr 01 2014 patches.mf

/tech/bas/kernels/BRDB6BRT_720_AIX_DB2_patch32/brdb6brt -V | grep "patch


level"
patch level 32

as ( xxxadm )

cp -p /usr/sap/${DB2DBDFT}/SYS/exe/run/brdb6brt /usr/sap/$
{DB2DBDFT}/SYS/exe/run/brdb6brt.SAVE
cp -p /tech/bas/kernels/BRDB6BRT_720_AIX_DB2_patch32/brdb6brt /usr/sap/$
{DB2DBDFT}/SYS/exe/run/brdb6brt
brdb6brt -V | grep "patch level"

patch level 32

[ ] as xxxadm check connectivity

cd
R3trans -d
db2 connect
db6level

# Cleanup later - after SAP check out

TE NOTE: DO NOT DO THIS STEP AT THIS TIME, NEEDED TO REVERT UPGRADE IF NEEDED

# These directories can be removed, assuming we are not reverting the system
back to 10.1
#
# /db2/db2${sid}/db2_software.old
# /db2/db2${sid}/sqllib_v101.old

[ ] Remove world writable from /db2 files and dirs which have it enabled [ dzdo su
- root ]

find /db2 -type f -perm -002 2>/dev/null


find /db2 -type f -perm -002 2>/dev/null | xargs chmod o-w
find /db2 -type f -perm -002

find /db2 -type d -perm -002 2>/dev/null


find /db2 -type d -perm -002 2>/dev/null | xargs chmod o-w
find /db2 -type d -perm -002
[ ] New links created in /usr/local/bin

If you are in an HA environment, set up the links on the failover server

as root

ls -ld /usr/local/bin/db2*

lrwxrwxrwx 1 root system 35 Feb 19 14:15


/usr/local/bin/db2greg -> /db2/db2hrd/db2_V10.5.7/bin/db2greg
lrwxrwxrwx 1 root system 37 Feb 19 14:15
/usr/local/bin/db2ls -> /db2/db2hrd/db2_V10.5.7/install/db2ls

set -a
sid=`df | grep "/db2/db2" | awk '{ print substr($7,9)}'`
echo $sid

cd /usr/local/bin
ln -sf /db2/db2${sid}/db2_V10.5.7/bin/db2greg
ln -sf /db2/db2${sid}/db2_V10.5.7/install/db2ls
./db2ls

ls -al /usr/local/bin/db2*

lrwxrwxrwx 1 root system 33 Dec 09 14:57 db2greg ->


/db2/db2bpd/db2_V10.5.7/bin/db2greg
lrwxrwxrwx 1 root system 35 Dec 09 14:57 db2ls ->
/db2/db2bpd/db2_V10.5.7/install/db2ls

[ ] Rebind db2exfmt per IBM Technote and SAPnote 1697946

1697946 - DB6: Error in db2diag-log with db2exfmt in EWA


http://www-01.ibm.com/support/docview.wss?uid=swg21614629

cd ~/db2_V10.5.7/bnd/
db2 connect to $DB2DBDFT
db2 bind db2exfmt.bnd blocking all grant public

[ ] Send email to Basis

Include:

Basis please review the following information for the DB2 10.5 FP7SAP upgrade.

Updating Data Extractors in SAP Solution Manager:

If your database is connected to SAP Solution Manager, you have to update the
data extractors for the upgraded database
using the setup wizard of SAP Solution Manager.

NOTE To monitor DB2 10.5, use SAP Solution Manager 7.1 or higher.

Procedure

1. Log on to your SAP Solution Manager system and call transaction SOLMAN_SETUP.
The screen SAP Solution Manager: Configuration appears in a separate Web
browser.
2. In the navigation frame, choose Managed Systems Configuration.
3. On the Database tab page, choose the upgraded database and the Configure
Database pushbutton.
The setup wizard of the SAP Solution Manager system appears.
4. Choose the Configure Automatically step.
5. Execute the automatic activity Database Extractor Setup.

Result

The setup wizard updates the back end of the DBA Cockpit and reschedules the
data extractors for the SAP Solution
Manager or the Database Performance Warehouse feature.

Minimum SAP Basis Support Packages:

See SAP Note 1835822 - DB6: Compatibility Patches for IBM DB2 10.5 for LUW

Symptom : The DBA Cockpit creates SQL errors when you connect to IBM DB2 for
Linux, UNIX, and Windows version 10.5
(DB2 10.5 for LUW) or higher.

To be able to use new functionality of DB2 10.5 in the application server ABAP,
you need
adaptions in the area of monitoring (SAP transaction DBACOCKPIT) and in the ABAP
data
dictionary. Make sure that you have implemented the following minimum SAP Basis
support
packages required for the different SAP releases:

SAP Basis Release SAP Basis Support Package


7.00 SP27
7.01 SP12
7.02 SP12
7.10 SP15
7.11 SP10
7.30 SP8
7.31 SP5
7.40 SP2

Description 1835822 DB6: Compatibility Patches for IBM DB2 10.5 for LUW

[ ] Paperwork

Change Control Item


Remedy => Change Control -> (F2) New

Contact Network ID: TExxxxx


Contact Last Name :

Owning Org: GIO


Change Category: DATABASE
Change Environment: TEST
Change Type : RELEASE/UPGRADE
Description : DB2 Upgrade to 10.5.7 SAP for CL3
Mercury# 4046927
Tested : YES
Outage Expected : NO
Application Name : SAP

Halt OpenView Alerts: (x) NO

Update the OneNote checklist.


Create PDF checklist in "\\us194mn11\DB2\10.5.7 Upgrades"

Insert upgrade into DBA_MONITOR.DBA_INSTALL_UPGRADES in DBADBD01_DBA01


Update the DATABASE_VERSION in DBA_MONITOR.INSTANCE_INVENTORY_DB2

###################################################################################
#############################################
THE END
###################################################################################
#############################################

Potrebbero piacerti anche