Before starting, run these command to capture the state of things. You may need or want some of this information later. ps -ef | grep db | sort To see which db processes are running. In particular, you can see which db instances are active. lslpp -L | grep db cat /var/ifor/nodelock ls -l /usr/lib | grep db ls -l /usr/include | grep db ls -lR /home/inst1/sqllib db2licm -l db2 list node directory db2 list db directory db2 list db directory | egrep 'name|entry|Local|alias' For each "Directory entry type = Indirect" (meaning local to this machine), and "Database alias" = "Database name" (meaning this isn't just an alias) make note of the "Database name". These are the databases you can connect to. db2ilist dasilist db2 connect to patent db2 "select substr(pkgschema,1,11) as PKGSCHEMA,pkgname,valid from syscat.packages \ where pkgschema<>'NULLID' and valid='Y' order by PKGSCHEMA" db2 "select count(*) from syscat.packages where valid='N' and pkgschema<>'NULLID'" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Notes from when I upgraded baboon from DB/2 Version 6.1, to Version 7.1 on 12-11-2001. Follow the directions in the "IBM DB2 Universal Database for UNIX Quick Beginnings Version 7" book, in chapter 2, Installing DB2 for AIX. On the "Install DB2 V7" screen, +-------------------------------- Install DB2 V7 --------------------------------+ | | | Select the products you are licensed to install. Your Proof of | | Entitlement and License Information booklet identify the products for | | which you are licensed. | | | | To see the preselected components or customize the selection, select | | Customize for the product. | | [ ] DB2 Administration Client [ Customize... ] | | [*] DB2 UDB Enterprise Edition [ Customize... ] | | [ ] DB2 Connect Enterprise Edition [ Customize... ] | | [*] DB2 Application Development Client [ Customize... ] | | | | To choose a language for the following components, select Customize for | | the product. | | DB2 Product Messages [ Customize... ] | | DB2 Product Library [ Customize... ] | | | | | | | | [ OK ] [ Cancel ] [ Help ] | +--------------------------------------------------------------------------------+ You want to - Select the first line, "DB2 Administration Client" by moving the cursor there and pressing enter. When you do that, the asterisk appears between the square brackets. - Select the second line, "DB2 UDB Enterprise Edition". - Select [ Customize... ] on the "DB2 UDB Enterprise Edition" line and and uncheck [ ] Local Warehouse Control Database [ ] Distributed Join for DB2 Data Sources [ ] Getting Started and all 4 of the Code Page Conversion Support: [ ] Japanese [ ] Simplified Chinese [ ] Korean [ ] Traditional Chinese Select [ OK ] when the screen looks like +--- DB2 Universal Database Enterprise Edition ------------------------+ | | | Required: Product Signature | | Optional: :*: Java Support | | [ ] Replication | | [ ] DB2 Control Server | | [ ] DFS Client Enabler | | [ ] Local Warehouse Control Database | | [ ] Distributed Join for DB2 Data Sources | | [ ] Information Catalog for the Web | | [ ] Getting Started | | [ ] Light-weight Directory Access Protocol | | [ ] Control Center | | Code Page Conversion Support: | | [ ] Japanese [ ] Simplified Chinese | | [ ] Korean [ ] Traditional Chinese | | | | | | [ Select All ] [ Deselect All ] [ Default ] | | [ OK ] [ Cancel ] [ Help ] | +----------------------------------------------------------------------+ - Also select "DB2 Application Development Client" and - also select [ Customize... ] for that line. Inside there, unselect "Light-weight Directory Access Protocol" making that screen look like +--- DB2 Application Development Client -------------------------------+ | | | Required: DB2 Client | | DB2 Application Development Tools (ADT) | | Optional: [*] Java Support | | [ ] DFS Client Enabler | | [ ] Information Catalog for the Web | | [ ] ISV Toolkit | | [ ] Light-weight Directory Access Protocol | | [*] Stored Procedure Builder | | [ ] Control Center | | [*] DB2 Sample Applications | | :*: Create Links for DB2 Libraries | | | | [ Select All ] [ Deselect All ] [ Default ] | | [ OK ] [ Cancel ] [ Help ] | +----------------------------------------------------------------------+ When you select [ OK ] on all the screens to actually start installing software, you'll get prompts about installing instances, userids, and such. Just say no to all of them, and [ OK ] to the subsequent warnings that these things won't be getting built. Yes, we know they're not getting built. They already exist, since we're doing a migration. This db2setup script installs the software and updates the system's /var/ifor/nodelock file with the appropriate license. # 5fbee0ee6feb.02.09.15.0f.48.00.00.00 6qx2v49x6sb5ipvmafpaa "" "7.1" #[admin_comment] "IBM Toronto Lab" "DB2 Enterprise Edition" "2145855600" "0" "1" Note the slightly different "DB2 Enterprise Edition" after I selected "DB2 UDB Enterprise Edition". Ah, well. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To change the default version of DB/2, you need to update/change the one link in /usr/lib and the 49 links in /usr/include, with the /usr/lpp/db2_07_01/cfg/db2ln command. This changes all these links to the db2_07_01 version as well as adding a couple more to /usr/include (51 total now). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In order to unmount /cdrom, I first had to kill -9 a java process that was left running, root 28482 1 0 11:03:53 pts/1 0:00 /cdrom/db2/install/prt/udbee/prt_2.4/aix/java/bin/aix/native_threads/jre -nojit -cp ./swinger.jar:./prtudbee.jar:./ com.ibm.lexington.prt.Welcome /brand=ibm /registerlater=no - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - When converting from Version 6 to Version 7, you must migrate your instances, but you do not have to migrate your databases. To migrate the inst1 instance, /usr/lpp/db2_07_01/instance/db2imigr -u db2fenc1 inst1 This command changes just about everything under /home/inst1/sqllib. I should have looked at this directory before doing this so that I understand what was changed, but how did I know what it was going to do? Maybe next time ... Note this command is ...migr and is used to MIGRATE an instance from one DB/2 version to another, as contrasted with the db2iupdt command used to UPDATE an instance after applying service (used below). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After this base DB/2 Version 7 is installed, I started up the database and verified things were working. Great! Now we need to install the latest DB/2 Fix Pack, which as of 12-11-2001, is Fix Pack 4. The notes for Fix Pack 4 say that we need Fix Pack 3 installed first. Both DB/2 Version 7 Fix Packs are at /afs/d/software/fixes at db2v7fp3 & -fp4. Fix Packs can be ftp'd from IBM's ftp.software.ibm.com site. For example, FP4 was /ps/products/db2/fixes/english/db2aixv7/FP4_U478685/FP4_U478685.tar.Z The DB/2 Fix Packs come with README's that you MUST follow, for example, /afs/d/software/fixes/db2v7fp3/delta_install/FixpakReadme.txt The important and surprising (!!) steps are - Stop all DB/2 processes. This includes more than just the inst1 processes. In particular, you must also issue the db2licd end command to kill the db2licd process. (!!) - slibclean - smitty update_all for /afs/d/software/fixes/db2v7fp3/delta_install (!!) - smitty update_all for /afs/d/software/fixes/db2v7fp3/delta_install/extras (!!) - Update the instance. As root, /usr/lpp/db2_07_01/instance/db2iupdt inst1 Sandy said that since we were installing Fix Pack 4, that we could "batch" this instance update with the one we're going to have to do after installing Fix Pack 4. But since this only takes a second to run, I did it anyway. Note this command is ...updt and is used to UPDATE the instance, as contrasted with the db2imigr command used above to MIGRATE an instance from one DB/2 version to another. The first time I did this, I used the wrong command. Perhaps that was the cause of the troubles I mention below. (!!) - Not documented anywhere, is a HUGE potential gotcha. As inst1, run the undocumented command, db2licm -l to see DB/2 licensing information. In particular, if Number of processors = "2" is larger than Number of licensed processors = "1" which it was for me on baboon, when starting DB/2, you'll get in the /home/inst1/sqllib/db2dump/db2diag.log, this error message SQL8017W The number of processors on this machine exceeds the defined entitlement of "1" for the product "DB2 Enterprise Edition". The number of processors on this machine is "2". To fix this, run the (also undocumented) command db2licm -n db2udbee 8 (or some "big" number) which would set this to Number of licensed processors = "8" (!!) - You need to rebind everything, especially the internal DB/2 stuff. As inst1, db2 terminate db2 connect to japionc db2 bind /usr/lpp/db2_07_01/bnd/@db2ubind.lst blocking all grant public Although the file's name in /usr/lpp/db2_07_01/bnd is just db2ubind.lst, you need to specify the "@", ala @db2ubind.lst, else you'll get errors. Don't ask me why. I didn't see what the "@" meant in the DB/2 books. db2 bind /usr/lpp/db2_07_01/bnd/@db2cli.lst blocking all grant public db2 terminate W A R N I N G !!!! This next step gave me no end of grief when I first ran it, but the first time through all this, I tried doing this step before fixing the Number of licensed processors problem and the rebinding steps above. I believe what I have here, is the proper sequence. - To enable some new built-in scalar functions (whatever they are), login as inst1 and run db2updv7 -d japionc -u inst1 -p inst1_password -n This command should only take a second or two. Anything else, and there's something wrong, like there was for me. I had Sandy fix things. Here is Sandy's notes on how she fixed things when I got everything all hosed up by not doing things in the proper sequence. You should not have to do this unless you've screwed up. I have it here for documentation only. logon as root cd /usr/lpp/db2_07_01/instance To list the instances on this machine (there was only inst1) ./db2ilist To drop the instance, ./db2idrop inst1 To recreate the instance, ./db2icrt -a server -u db2fenc1 inst1 That allowed her to then su - inst1 db2start This "worked like a champ" but it evidently blew away both the node and database directories. Sandy recatalog'd the local databases with db2 catalog db japionc as japionc on /home/inst1 db2 catalog db was as was on /home/inst1 But she didn't bother with (or probably know about) the other two remote databases that used to be there, V4PROD on giraffe & PATENT on elephant. Oh, well. If somebody needs those, they'll have to recreate them. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Finally, we can upgrade to Fix Pack 4. - Stop all DB/2 processes. As inst1, su - inst1 db2 terminate db2stop db2licd end slibclean - Then as root, (I had to zcat | tar xvf it first) smitty update_all from /afs/d/software/fixes/db2v7fp4/delta_install - Update the instance. As root, /usr/lpp/db2_07_01/instance/db2iupdt inst1 - Check the licenses again. As inst1, db2licm -l showed Number of licensed processors = "8" Good! I didn't have to do anything here. - They say to rebind everything again. As inst1, db2start db2 connect to japionc db2 bind /usr/lpp/db2_07_01/bnd/@db2ubind.lst blocking all grant public db2 bind /usr/lpp/db2_07_01/bnd/@db2cli.lst blocking all grant public db2 terminate - Checked that the local databases was still catalog'd ok. db2 list db directory showed WAS & JAPIONC ok, but it also had a SAMPLE databse defined, so I db2 drop database sample and killed it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -