There are many ways to uninstall DB2. Next we will introduce you to the DB2 detach method in abnormal circumstances. If you do not know the DB2 detach method well, take a look.
Troubleshooting DB2 uninstall Method
1) run the SETUP program from the original installation disk
If You Cannot uninstall DB2 from the Add/delete programs in the Windows Control Panel. First, we should try to run the "setup" program CD or network drive from the original installation media ). Make sure that DB2 products such as ESE, ADMCL, and WSE on the installation media are the same as those on the service level such as GA, FP2, and V82 before running them. Windows Installer detects that the product has been installed and provides three options: repair, change, and delete. Select "delete" to uninstall the product.
Another possibility is that Windows Installer will ask the original. msi file location. In this case, locate the original installation location and go to [original installation location] \ db2 \ Windows \ [DB2 product]. msi selects the original. msi file.
(2) Use force uninstall FORCE_UNINSTALL)
The failure to uninstall DB2 may result from several factors, such as the user modifying the system registry, DB2 UDB file or directory structure. In this case, we must use the force uninstall method.
This method requires the msiexec program to uninstall the product, and you also need to manually clear some content. To uninstall a product, follow these steps:
1. Stop the DB2 service. For the DB2 service, see the "Reference" section below. This step can be achieved through the "service" management tool in the Windows Control Panel.
2. Go to the installation directory of Windows Installer from the command line, for example, c: \ Windows \ Installer or c: \ WinNT \ Installer ).
3. Run the command msiexec/x FORCE_UNINSTALL = Y. For the DB2 product ID, see the "Reference" section below. If the command cannot be completed successfully, you are not allowed to manually uninstall it. If the operation is successful, proceed with the following steps.
4. Clean up environment variables. For the DB2 environment variables, see the "Reference" section below. Go to the control panel, click "system", click the "advanced" tab, and click the "environment variable" button. Clear all DB2 environment variables.
5. Clean up the registry. Find the Windows Registry Key of "SQLLIB" and clear all the following key values.
6. Clear service files. Delete DB2 entries under [Windows] \ system32 \ drivers \ etc.
7. Clear SQLLIB. Delete the SQLLIB directory.
8. Clear shortcuts. Find the "IBM DB2" shortcut Directory, which is under the "Start" menu/Program "directory under the" All Users "User attribute directory. Delete this directory, delete all DB2 links under the "Start" directory.
Four ways to delete DB2 data
DB2 tablespace size limit
Deep understanding of DB2 stored procedures
DB2 exception Processor type
DB2 lock compatibility and deadlock