Saturday, March 28, 2009

Troubleshooting db2 V9.1 installation in solaris10

1. Procedure to install db2 and configure for TADDM


INSTALL DB2
===========
Login as root:

groupadd db2grp1
useradd -g db2grp1 -m -d /home/db2inst1 db2inst1 (Not able to create user see below)
useradd -g db2grp1 -m -d /home/db2fenc1 db2fenc1
passwd db2inst1
passwd db2fenc1

install base
use db2_install, select DB2_ESE

install fp10
installFixPack -y -- if required

SETUP DB2 INSTANCE
==================

cd /opt/IBM/db2/v8/instance
./db2icrt -u db2inst1 db2inst1

su - db2inst1

cat /etc/services

db2 update dbm cfg using SVCENAME 60000

db2set DB2COMM=tcpip

db2set -all

START DB2
=========

db2start

ps -ef|grep db2
- check that db2ip* is running

CREATE DB2 DATABASE:
===================

create the database:

cd dist/support/bin
./make_db2_db.sh cmdb

2. I cannot make sub directory for users. I tried to make directory using
"useradd -m user_id" but, same error just occurred


useradd:ERROR: Unable to create the home directory : Operation not applicable.

solaris 7, /home directory mode is dr-xr-xr-x .

The solaris FAQ says:
Why can't I write in/mount over /home?
SunOS 5.x is delivered with the "automounter" enabled. The
automounter is designed for NFS sites, to simplify maintenance of
the list of filesystems that need mounting. However it is a burden
for standalone sites.
The automounter takes over /home and in effect becomes the NFS
server for it, so it no longer behaves like a normal directory.
This is normally a Good Thing as it simplifies administration if
everybody's home directory is /home/, regardless of their
physical location.
If you want to continue to use the automounter, edit /etc/auto_master
and comment out the line starting with "/home". Then run the
"automount" command which will cause automountd to reload the maps.
To kill it off for standalone or small networks running Solaris 2.3
or later, you can stop automountd by running "/etc/init.d/autofs
stop". Prevent it from starting at boot time by renaming the file
/etc/rc2.d/SXXautofs to /etc/rc2.d/sXXautofs, where XX are two
digits depending on the OS release. (If you change your mind, just
rename it back)
In Solaris 2.2, the procedure is different. You need to comment
out the three lines in /etc/init.d/nfs.client that start "if" (from
the if to the fi!!), and reboot (Solaris 2.2)
To learn about it, read the O'Reilly book "Managing NFS and
NIS", or ftp the white paper 'The Art of Automounting". from
sunsite.unc.edu in the directory /pub/sun-info/white-papers.