How can I manually drop an instance, and/or uninstall DB2 for Linux/Unix?
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