Sunday 28 April 2013

Fix Pack Installation—DB2 V9.5 FP



Pre-Installation Task:

               To obtain root id from ServerAdmin prior to start of Migration
              Check out the FileSystem space available
              The new version FP is Uploaded into Path: Fixpak location in the servers
Pre install Steps

1.Disable the crontab
2.db2 get admin cfg >admincfg.out
3 db2licm -l > db2licm_before.txt
4 db2 get dbm cfg > dbmcfg_before.txt
5 db2 get admin cfg > admincfg_before.txt
6 db2 list db directory > dbdir_before.txt
7 db2 list node directory > nodedir_before.txt
8 db2 list dcs directory > dcsdir_before.txt
9 db2 get db cfg for <dbname> > dbcfg_<dbname>_before.txt
10 db2set -all > db2set_before.txt
11 db2 list applications show detail > listapplications_before.txt
12 db2 list tablespaces show detail > tablespaces_<DBname>_before.txt (after connecting to each database)
13) db2look -d <db_name> -e -o <(dbname)_look_before.txt> -l -x -f (after connecting to each database)
14) db2 LIST PACKAGES FOR ALL SHOW DETAIL > packages.before
15) db2 "select * from syscat.bufferpools" > bufferpools.before
16) db2 UPDATE DBM CFG USING diaglevel 4 (make sure that we are updating it back to 3 after the install)

1.db2 force applications all
2.Take the full offline database backups ***

Steps for Installation:

1) Stop of DB2 Process:
  • Make a connection as instance administrator for each instance and execute the following commands:

                               $db2 force applications all
                               $db2 terminate
                               $db2stop
                               $db2licd -end (Must be launch on each node)

  •  Make a connection as DAS administrator (DAS or root) & Go to Execute the following command 
                               $su - <das id>
                               $db2admin stop

      Stop the Fault Monitor Coordinator and the Fault Monitor
  • Login as root and go to /db2/sftw/<instance name> /sqllib/bin and execute the following commnad’s 
                            $./db2fmcu -d
                            $./db2fm -d
                login as instance owner, Verify that the IPC interconnection processes are clean with:
cd  /db2/sftw/<instance name> /sqllib/bin/

                              $>ipclean
                              $db2fmcu -d...if not running then the following

from the main session...db2nkill -9...to kill all the db2 processes
again in duplicate session /home/db2dbas/das/bin/db2fm -i db2dbas -D
ps -ef | grep -i db2...to check any db2 process is running or not.

2) Installation of Fix pack

         Verify that you have atleast 700MB available on /usr/opt
            $df -m /opt
             Connect as root
             Go in DB2 FP repository and launch the following command
           $> cd <fix location>
           $> ./installFixPack -b /opt/IBM/db2/V9.5

Post Installation steps:

                 Update and restart of Instances
                 Update DB2 Instance as root
                            $cd /opt/IBM/db2/V9.5/instance
                            $./db2iupdt <instance name>
                 Update DB2 Admin Server db2as as root,
                            $./dasmigr
                            $./dasupdt <das id>
                 Stop and Start Admin Server
                            $db2admin stop
                            $db2admin start
                 Update each database as instance owner,
                            $db2updv95 –d <database Name>
                            $db2updv95 –d <database Name>
                 Verify db2level.

DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL09055" with level identifier "06060107".
Informational tokens are "DB2 v9.5.0.5", "s091123", "U829462", and Fix Pack "5".
Product is installed at "/opt/IBM/db2/V9.5".

                 Bind of DB2 UDB Databases:
                          Connect as instance administrator and launch the following commands
                                  $db2 terminate
                                  $db2 connect to <db name>
                                  $cd ~/sqllib/bnd
                                  $db2 BIND @db2ubind.lst BLOCKING ALL GRANT PUBLIC
                                  $db2 BIND @db2cli.lst BLOCKING ALL GRANT PUBLIC
                                  $db2 BIND db2schema.bnd BLOCKING ALL GRANT PUBLIC sqlerror continue
                                  $db2 connect reset
                                  $db2 terminate

                     $db2 BIND @applyur.lst isolation ur BLOCKING ALL GRANT PUBLIC
                     $db2 BIND @applycs.lst isolation cs BLOCKING ALL GRANT PUBLIC
                     $db2 BIND @capture.lst isolation ur BLOCKING ALL GRANT PUBLIC


Stop and Start the Instance
                 $db2stop
                 $db2start

Checking of Table spaces state:
                          $db2 list tablespaces on <database> | grep -i state
Test some commands after connecting to the database :
                          $db2 list tables for all
                          $db2 "select count (*) from schema.table/view"

$>>Enable the crontabs

ask the client to test and verify the applications

Back out plan:
             Downgrade DB2 Instance back to DB2 V9.5 fixpak3b as root,
             cd /opt/IBM/db2/V9/FP5/instance
            ./db2iupdt -D <instance name>
             Downgrade DB2 Admin Server
            ./dasupdt –D




No comments:

Post a Comment