SuSE GmbH

SuSE Support Database

Title: IBM DB2 on SuSE Linux 6.1 Evaluation CD does not work

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

IBM DB2 on SuSE Linux 6.1 Evaluation CD does not work

Applies to

SuSE Linux: Version 6.1 Beta/Evaluation CD

Symptom:

You installed IBM's DB2 database (package ibmdb2) from the SuSE Linux 6.1 Evaluation CD.

DB2 does not start, however. The invocation of the start script

  root:~# rcdb2 start     # or equivalently:
  root:~# /sbin/init.d/db2 start
produces nothing but an error message

Cause:

The package on the 6.1 Beta CD is incomplete :-(
There aren't really any important files missing, but some necessary initialization commands for DB2 are not executed.

This bug will be fixed, of course, in SuSE Linux 6.1.

Solution:

The following shell script completes the installation of DB2. After this, the start script command above should also work. Execute the following as root:
--------8<--------    Start below    ----------8<----------

#!/bin/bash
#
#  Create and initialize a sample DB2 instance
#  (the needed accounts are already present)
#
#  First, provide the $HOME/.profile files in case of need
#
for user in db2fenc1 db2inst1 db2as ; do
        passwdline=$( /usr/bin/grep "^$user" /etc/passwd )
        group=$(echo "$passwdline" | cut -d: -f4)
        home=$(echo "$passwdline" | cut -d: -f6)
        if [ ! -e "$home"/.profile ] ; then
                /bin/cp -a /etc/skel/.profile "$home"
                /bin/chown "${user}"."${group}" "$home"/.profile
        fi
done

/bin/cp -a /etc/inittab /etc/inittab.predb2
#
#  Note: the following command creates /etc/rc.db2 and modifies
#  /etc/inittab. This is not needed in SuSE Linux: we provide
#  /sbin/init.d/db2 instead.
#
/usr/IBMdb2/V5.0/instance/db2icrt -a SERVER -u db2fenc1 db2inst1

/usr/IBMdb2/V5.0/install/db2iexec db2inst1 \
        ". sqllib/db2profile; \
         db2 update dbm cfg using svcename db2cdb2inst1; \
         db2set -i db2inst1 db2comm=tcpip; \
         db2 terminate"

#   Create the DB2 Administration server
#
/usr/IBMdb2/V5.0/instance/dasicrt db2as

#  Restoring the original /etc/inittab -- DB2 can be started
#  by means of /sbin/init.d/db2
#
if [ -f /etc/inittab.predb2 ] ; then
   /bin/rm -f /etc/rc.db2
   /bin/mv -f /etc/inittab.predb2 /etc/inittab
fi

# --------8<----------    The End     -------------8<------

----------

Keywords: DB2, DATABASE, BETA, 6.1, IBM

----------

Categories: Applications , Applications , Commercial Applications

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-ibmdb2_beta, Copyright SuSE GmbH, Nuremberg, Germany - Version: 23. Mar 1999
SuSE GmbH - Last generated: 07. Oct 1999 16:41:26 by maddin with sdb_gen 1.00.0