Installation of IBM DB2 V6.1 on SuSE Linux > 6.1

Support knowledgebase (mkraft_db2)
Applies to

SuSE Linux: Versions 6.1 to 7.0
This article refers to an older version of SuSE Linux. Therefore some of the informations given in this article may be outdated or the article may contain stale links.

IBM DB/2: Version V6.1

Request:

You want to apply IBM DB/2 on your SuSE Linux > 6.1

Procedure:


Latest update 27.03.2000

This is a stepwise installation description to install IBM DB2 V6.1 on
SuSE Linux. Current working platforms are



- default / minimum installation of SuSE Linux
- install paket pdksh from series ap

- change password for user (use passwd):
  db2inst1:     ibmdb2
  db2as:        ibmdb2
  db2fenc1:     ibmdb2
- change access rights for directories from:
(not necessary at SuSE Linux >=6.4)
  /usr/lib/db2:
  drwxr-xr-x   2 root     root         1024 Dec 21 14:07 db2inst1/
  drwxr-xr-x   2 root     root         1024 Dec 21 14:07 db2fenc1/
  drwxr-xr-x   2 root     root         1024 Dec 21 14:07 db2as/
to
  /usr/lib/db2:
  drwxr-xr-x   2 db2inst1 db2iadm1     1024 Dec 21 14:07 db2inst1/
  drwxr-xr-x   2 db2fenc1 db2fadm1     1024 Dec 21 14:07 db2fenc1/
  drwxr-xr-x   2 db2as    db2asgrp     1024 Dec 21 14:07 db2as/

  chown db2inst1:db2iadm1 db2inst1
  chown db2fenc1:db2fadm1 db2fenc1
  chown db2as:db2asgrp    db2as   
- insert .profile in home directories for users db2inst1 / db2as

---- snip
. $HOME/sqllib/db2profile

# The following three lines have been added by UDB DB2.
if [ -f sqllib/db2profile ]; then
    . sqllib/db2profile
fi
---- snip

!!! important to run DB2 V6.1 on SuSE Linux >=6.3 !!!

!!! important to run DB2 V6.1 on SuSE Linux >=6.3 !!!


test the installation:

If the DB2 tools have not been installed, you can verify the
installation by creating the sample database and connect to
dbsample using the command line processor:

  1. Login as a user with db admin priveliges (SYSADM; z.B. db2inst1)

  2. (this has been done already if you followed above instructions):

    (Issue the command db2sampl to initalize the sample db.
    The sample db will be entered to the catalog automatically
    with the alias SAMPLE .)

  3. Start the database manager by calling db2start.

  4. Use the following commands to establish a connection to the sample
    database, select a list of all employees from departmet 20 and
    reset the connection:

    db2 connect to sample
    db2 "select * from staff where dept = 20"
    db2 connect reset

  5. Stop the database manager with db2stop.

cleaning up a failed installation

This should be all to cleanup the system for a new installation if reboot is intented.



- If no reboot should be done, possibly pending ipc resources should be freed:

- kill all db2 releated programs
  > ps auxw | grep db2

  db2as     8351  0.0 17.5 40656 11044  p1 S <  16:32   0:00 db2sysc
  db2as     8353  0.0 17.6 40656 11104  p1 S <  16:32   0:00 db2ipccm
  db2as     8355  0.0 17.6 40656 11136  p1 S <  16:32   0:00 db2tcpcm
  db2as     8356  0.0 17.7 40656 11148  p1 S <  16:32   0:00 db2tcpdm
  root      8350  0.0 17.4 40652 10964  p1 S <  16:32   0:00 db2wdog 
  root      8352  0.0 17.4 40652 10976  p1 S <  16:32   0:00 db2gds 
kill -9 8351 8353 ...


- free ipc resources still used by db2 users

> ipcs

  ------ Shared Memory Segments --------
  key       shmid     owner     perms     bytes     nattch    status
  0x00000000 0         wwwrun    600       46084     6         dest 
  0x7403b020 257       db2as     767       524288    7
  0x6103b020 258       db2as     701       3555328   7

  ------ Semaphore Arrays --------
  key       semid     owner     perms     nsems     status
  0x7403b020 256       db2as     767       1
  0x00000000 257       db2as     761       1
  0x7303b020 258       db2as     767       1
  0x00000000 259       db2as     761       1
  0x5a03b020 260       db2as     666       1
  0x00000000 261       db2as     761       1
  0x00000000 262       db2as     761       1

  ------ Message Queues --------
  key       msqid     owner     perms     used-bytes  messages
  0x00000000 3203      db2as     701       0           0
  0x00000000 3204      db2as     701       0           0
  0x7103b020 3205      db2as     763       0           0
  0x7203b020 3206      db2as     763       0           0
  0x7703b020 3207      db2as     765       0           0

> ipcrm shm 257
> ipcrm shm ...
> ipcrm sem 256
> ipcrm sem ...
> ipcrm msg 3203
> ipcrm msg ...

> ipcs

  ------ Shared Memory Segments --------
  key       shmid     owner     perms     bytes     nattch    status
  0x00000000 0         wwwrun    600       46084     6         dest 

  ------ Semaphore Arrays --------
  key       semid     owner     perms     nsems     status

  ------ Message Queues --------
  key       msqid     owner     perms     used-bytes  messages

- This should be all to cleanup the system for a new installation



- If you start the installation over again db2setup complains about
DBI1767W DB2 registry may contain corrupted information.
+------------------------------- DB2 Installer --------------------------------+
|                                                                              |
|  +--- Warning ------------------------------------------------------------+  |
|  |                                                                        |  |
|  |   DBI1767W DB2 registry may contain corrupted information.             |  |
|  |                                                                        |  |
|  |   Explanation:  The registry may contain invalid instance              |  |
|  |   information. This is probably due to the fact that an instance or    |  |
|  |   the Administration Server is not deleted properly before removing    |  |
|  |   the DB2 product. If you are re-installing the product and want to    |  |
|  |   keep the existing instance information in the registry, press        |  |
|  |   Cancel. Otherwise, press OK to re-create the registry. Do you        |  |
|  |   want to re-create the registry?                                      |  |
|  |                                                                        |  |
|  |   User Response:                                                       |  |
|  |                                                                        |  |
|  |   o   Press OK to re-create the registry, or                           |  |
|  |                                                                        |  |
|  |   o   Press Cancel to keep the current registry information.           |  |
|  |                                                                        |  |
|  |   [   OK   ]                                              [ Cancel ]   |  |
|  +------------------------------------------------------------------------+  |
+------------------------------------------------------------------------------+
- choose OK to re-create the registry





Keywords: IBM, DB2, DATABASE, DATENBANK

SDB-mkraft_db2, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 17. Mär 2000
SuSE Linux AG - Last generated: 22. Mai 2002 by sdb (sdb_gen 1.40.0)