Upgrading from DB2 V8.2 to DB2 V9.5
I recently went through a rally of upgrading the DB2 UDB V8.2 to DB2 9.5 .  IBM slowly sneaked in the end of support for DB2 V8.2, though this has created lot of unhappy customers as lot of third party vendors have not yet certified Db2 V9.5 . Siebel for one does not yet support DB2 V9.5 !  Something to remember when upgrading is there are few DB2 fixpaks for V9.5 already, the latest being FP3b.  Its important these fixpaks are installed as you upgrade them mainly because of  certain “bad” ones.  On AIX there is a catch, you might get segmentation fault if you install FP2 + before you migrate instance, unless you install an APAR.  So the route I took was to install DB2 V9.5 on a new path, migrate the instance, migrate the databases and then install the fixpack.  This worked for me.  I did encounter couple of interesting issues during migration, mostly because of oversite !  But I thought I will share it here, since when I searched on google, I couldn’t get any information and had to figure it out myself.
One if my servers is on HACMP , so the db2node.cfg has the cluster name on it :
0 db2servercl 0
even though the server name is db2server1.    During DB2CKMIG, db2 checks at the db2nodes.cfg and tries to associate that with the DB2SERVER value to find the files on the local database directory. If the entry on the db2nodes.cfg file doesn’t match the server name, it would not find the database on the local directory and db2ckmig fails. An easy way to test this is :
- Stop the instance (db2stop)
- Run : db2 list db directory
- Run : db2 list db directory on <dbpath>
If step 3 works then you should be ok with db2ckmig, if it does not then you have an issue. Easy fix is during the migration, change the db2node.cfg entry to match the server name. Infact try and run the above test , it should work.
Another issue I encountered during the migration was when I was installing the FixPack. The installFixPack failed at “update of runtime path“ task. From Db2 V9.x IBM has changed the way installFixPacks work, you can no longer just apply the fixpak and has changed the options that go with it too. installFixPack will check the prereq and figure out what all it needs to do and will let you know how many tasks its going to perform and how long it will take. However it will not tell us what all the tasks are ahead of time (thats lousy coding), it will tell you the task as it goes. The approx time it estimates has always been wrong !. Luckily it always overestimates.
As I mentioned earlier, I encountered an error during “update of runtime path” task. I got the following error :
Starting the update of runtime path …
Sun Apr 19 01:56:30 CDT 2009
Changing the embedded runtime path for DB2 deliverables installed
under /opt/IBM/db2/V9.5 from /opt/IBM/db2/V9.5/ to /opt/IBM/db2/V9.5/
—> Please wait
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2locale.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2genreg.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2osse_db2.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2dasapi.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2install.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2osse.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2g11n.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2dascmn.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2sec.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libdb2trcapi.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libgcf.a’: error: 26(Text file busy)
db2chglibpath: Unable to open file for write: ‘/opt/IBM/db2/V9.5/lib64/libgcffm.a’: error: 26(Text file busy)
——————————————————————
The embedded library path of the following files could not be
updated with the current installation path
/opt/IBM/db2/V9.5/.
due to some unexpected error. Please rerun db2chgpath. If the
problem can not be resolved, please contact IBM DB2 Support.
——————————————————————
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2locale.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2genreg.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2osse_db2.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2dasapi.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2install.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2osse.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2g11n.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2dascmn.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2sec.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libdb2trcapi.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libgcf.a
FAIL (unexpected error): /opt/IBM/db2/V9.5/lib64/libgcffm.a
——————————————————————
Output was saved in the log file /tmp/db2chgpath.log
Sun Apr 19 01:57:21 CDT 2009
———————————————————–
ERROR: There were errors during the run of the db2chgpath
program to change the embedded runtime path of the
related DB2 library and executable files
from
/opt/IBM/db2/V9.5/
to
/opt/IBM/db2/V9.5/
You may need to manually rerun db2chgpath.
Check the log file /tmp/db2chgpath.log for details.
If the rerun is successful, please follow the DB2
quick beginning books to configure DB2 instance(s)
and/or DAS as needed.
If the problem persists, please contact IBM DB2 Support.
After a bit of research I found that the db2fmd process was respawned by initab since I had not commented out the step. Once I commented that out and killed the db2fmd process. The installFixPack went smooth.
Be sure to check this link before you migrate your instance so you know what all bugs and issues you might face.
Here is the document that outlines the migration steps I followed when I migrated my databases from DB2 V8.2 to DB2 V9.5 and installed FP3b :db2-v95-migration-steps-for-aix This document can be used only as a reference and in noway warranty that it will work on your environment.
Good luck with your upgrade effort and do let me know if you find any errors or process improvements I can make on my document.