Troubleshooting
Problem
Customers applying the latest security fix for Db2 V9.7 SB 38744 on Linux-type platforms are unable to start the instance after the upgrade due to db2iupdt not creating the file named 'fencedid' in '/home/db2inst1/sqllib/adm' directory. The workaround is to manually create the file with appropriate contents and ownership.
Symptom
Receive error:
SQL1042C An unexpected system error occurred. SQL1032N No start database manager command was issued. SQLSTATE=57019
In the db2diag.log look for ENOENT associate with the file named fencedid.
FUNCTION: DB2 UDB, oper system services, sqloWatchDogSetup, probe:10 MESSAGE : ZRC=0x83000002=-2097151998 CALLED : OS, -, lstat OSERR : ENOENT (2) "No such file or directory" DATA #1 : File name, 50 bytes /home/db2inst1/sqllib/adm/fencedid DATA #2 : String, 41 bytes Failed to lstat sqllib/adm/fencedid file. DATA #3 : String, 27 bytes Run db2iupdt command first.
Cause
The db2iupdt does not create the file /home/db2inst1/sqllib/adm/fencedid .
Environment
All Linux-type platforms on Db2 V9.7 are affected. Windows platforms are not affected.
Resolving The Problem
To resolve the issue, as root, you need to create the '/home/db2inst1/sqllib/adm/fencedid' file with the following content:
db2fencedid:<instancename>:<fencedid>:<fencedgroupid>
The following script will create the file automatically on a linux platform, if the old .fenced file still exists on the system and the first argument is the db2 instance name (e.g. "script.sh db2inst1")
#!/bin/sh # This script will create a fencedid file that has the correct format, assuming .fenced exists. # MUST be run as root. echo "Using db2instancename: $1" OLDFILE=/home/$1/sqllib/adm/.fenced NEWFILE=/home/$1/sqllib/adm/fencedid if [ -f "$OLDFILE" ]; then touch $NEWFILE chmod 644 $NEWFILE fencedid=$(stat -c '%u' $OLDFILE) fencedgroupid=$(stat -c '%g' $OLDFILE) printf '%s\n' "db2fencedid:$1:$fencedid:$fencedgroupid" > $NEWFILE echo "Writing to file: db2fencedid:$1:$fencedid:$fencedgroupid" else echo 'The .fenced file does not exist.' fi
Document Location
Worldwide
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
11 July 2019
UID
ibm10959065