How can I manually drop an instance, and/or uninstall DB2 for Linux/Unix

How can I manually drop an instance, and/or uninstall DB2 for Linux/Unix?

Technote (troubleshooting)

Problem(Abstract)
I have an installation of DB2 Universal Database for Linux, Unix and Windows product installed on Unix/Linux, and I cannot drop the instance and/or uninstall the product due to an error. I still need to perform the action, so how can I manually drop the instance, and/or uninstall DB2?
Resolving the problem
If you need to drop an instance, and or uninstall DB2 LUW on either Unix or Linux, but are receiving an error that is preventing you from doing this, then you will need to manually drop the instance, and uninstall the DB2 product.
If you are going to manually uninstall, you will need to also drop all the instance(s) associated with that installation. If you are only manually dropping an instance, then you can just do that. Here are the steps you need to take (NOTE that the following examples are for v9.7, but are applicable to all versions from v9.5 to v10.5):

1. First you will need to get the registry entries for the instance(s) that you are going to manually drop (Section “A” below). If also manually uninstalling, then you will ALSO need to get the registry entries for the installation, as well as any registry variables that are tied to the installation (Section “B” below”). As the instance owner, run “db2greg -dump”. You should save this output as a text file so you can refer to it later if needed. The instance records will start with “I”, the installation records (called “Service” records) will start with an “S”, and the variable records will start with a “V”. You need to locate the appropriate records. As an example, you might see something like this when you run “db2greg -dump”:

[db2v97@my-system ~]$ db2greg -dump
V,DB2GPRF,DB2SYSTEM,my-system,/opt/ibm/db2/V9.7,
V,DB2GPRF,DB2FCMCOMM,TCPIP4,/opt/ibm/db2/V9.7,
S,DB2,9.7.0.8,/opt/ibm/db2/V9.7,,,8,0,,1373391932,0
S,DB2,9.7.0.8,/v97fp8_install,,,8,0,,1380144089,0
V,DB2GPRF,DB2SYSTEM,my-system,/v97fp8_install,
S,DB2,9.7.0.8,/db297fp8/db2,,,8,0,,1380573119,0
V,DB2GPRF,DB2SYSTEM,my-system,/db297fp8/db2,
V,DB2GPRF,DB2FCMCOMM,TCPIP4,/db297fp8/db2,
I,DB2,9.7.0.8,db2v97,/home/db2v97/sqllib,,1,0,/opt/ibm/db2/V9.7,,
V,DB2GPRF,DB2INSTDEF,db2v97,/opt/ibm/db2/V9.7,
V,DB2GPRF,DB2SYSTEM,my-system,/opt/ibm/db2/V10.1,
I,DB2,10.1.0.3,db2v101,/home/db2v101/sqllib,,1,0,/opt/ibm/db2/V10.1,,
V,DB2GPRF,DB2INSTDEF,db2v101,/opt/ibm/db2/V10.1,
S,DB2,10.1.0.3,/opt/ibm/db2/V10.1,,,3,0,,1398537384,0
[db2v97@my-system ~]$

阅读更多

The db2prereqcheck utility was unable to validate the configuration of the log_mtts_per_seg parameter on the following host machine

在搭建DB2 PURESCALE环境,在作环境检查时,意外地遇到如下错误:

Validating “modprobe.conf” …
DBT3588W The db2prereqcheck utility was unable to validate the configuration of the log_mtts_per_seg parameter on the following host machine: “node02”. Reason code: “1”.
WARNING : Requirement not matched.

[root@node02 server]# more /etc/modprobe.conf
/etc/modprobe.conf: No such file or directory
[root@node02 server]# echo “options mlx4_core log_mtts_per_seg=7” >> /etc/modprobe.conf
[root@node02 server]# more /etc/modprobe.conf
options mlx4_core log_mtts_per_seg=7
[root@node02 server]# ./db2prereqcheck

 

Validating “modprobe.conf” …
Requirement matched.

至此,全部安装条件符合,可以顺利安装DB2 PURESCALE功能组件啦。。

 

The DB2 installer detected that an RSCT peer domain is online. Bring the peer domain offline in order to allow the DB2 installer to update the TSA installation

在重装db2 purescale 环境时候,遇到如下错误:

***********************************************************
SERVER
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
yes
DB2 installation is being initialized.

The DB2 installer detected that an RSCT peer domain is online. Bring the peer
domain offline in order to allow the DB2 installer to update the TSA
installation. For more information, see the DB2 Information Center at:
“http://publib.boulder.ibm.com/infocenter/db2luw/v10r5/index.jsp”.

A major error occurred while installing “DB2 Server Edition ” on this
computer. The installation cannot continue. If the problem persists contact
your technical service representative.

For more information see the DB2 installation log at
“/tmp/db2_install.log.3320”.

错误解决过程:

[root@node01 server]# find / -name RSCT
[root@node01 server]# find / -name lsrpdomain
/usr/sbin/rsct/bin/lsrpdomain
/usr/bin/lsrpdomain
[root@node01 server]# lsrpdomain
Name OpState RSCTActiveVersion MixedVersions TSPort GSPort
db2domain_20180721074041 Online 3.1.4.4 No 12347 12348

[root@node01 server]# lsrpnode
Name OpState RSCTVersion
node02 Online 3.1.4.4
node01 Online 3.1.4.4
[root@node01 server]# stoprpnode node01
2632-110 The operation was rejected by one or more nodes, probably because one or more resources are online or there was an error encountered in determining if any resources are online.
node01: 2661-025 The operation cannot be completed because one or more resources from the IBM.Application class is online.

[root@node01 server]# rmrpnode node01
rmrpnode: node01 is not offline to the peer domain.

[root@node01 server]# stoprpnode -f node01
[root@node01 server]# stoprpnode -f node02
stoprpnode: There are no nodes in the peer domain or an online peer domain does not exist.

root@node01 server]# lsrpnode
lsrpnode: There are no nodes in the peer domain or an online peer domain does not exist.
[root@node01 server]# rmrpnode node01
rmrpnode: There are no nodes in the peer domain or an online peer domain does not exist.
[root@node01 server]# rmrpdomain -f db2domain_20180721074041

[root@node01 server]# ./db2_install

。。。。。。。。。。。。。。。。。。。

Task #56 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #56 end

The execution completed successfully.

For more information see the DB2 installation log at
“/tmp/db2_install.log.7901”.

 

最后DB2 PURESCALE  组件安装完成。