Installation guide

100 Chapter 5:Database Services
;;
esac
17. Modify the /usr/IBMdb2/V6.1/instance/db2ishut file on both cluster systems to
forcefully disconnect active applications before stopping the database. For example:
for DB2INST in ${DB2INSTLIST?}; do
echo "Stopping DB2 Instance "${DB2INST?}"..." >> ${LOGFILE?}
find_homedir ${DB2INST?}
INSTHOME="${USERHOME?}"
su ${DB2INST?} -c " \
source ${INSTHOME?}/sqllib/db2cshrc 1> /dev/null 2> /dev/null; \
${INSTHOME?}/sqllib/db2profile 1> /dev/null 2> /dev/null; \
>>>>>>> db2 force application all; \
db2stop " 1>> ${LOGFILE?} 2>> ${LOGFILE?}
if [ $? -ne 0 ]; then
ERRORFOUND=${TRUE?}
fi
done
18. Edit the inittab file and comment out the DB2 line to enable the cluster service to handle
starting and stopping the DB2 service. This is usually the last line in the file. For example:
# db:234:once:/etc/rc.db2 > /dev/console 2>&1 # Autostart DB2 Services
Use the cluadmin utility to create the DB2 service. Add the IP address from Step 1, the shared
partition created in Step 2, and the start/stop script created in Step 16.
To install the DB2 client on a third system, invoke these commands:
display# mount -t iso9660 /dev/cdrom /mnt/cdrom
display# cd /mnt/cdrom/IBM/DB2
display# ./db2setup -d -r /root/db2client.rsp
To configure a DB2 client, add the service’s IP address to the /etc/hosts file on the client system:
10.1.16.182 ibmdb2.lowell.mclinux.com ibmdb2
Then, add the following entry to the /etc/services file on the client system:
db2cdb2inst1 50000/tcp
Invoke the following commands on the client system:
# su - db2inst1
# db2 catalog tcpip node ibmdb2 remote ibmdb2 server db2cdb2inst1
# db2 catalog database sample as db2 at node ibmdb2
# db2 list node directory
# db2 list database directory