The db2_deinstall command is also available on the DB2 product DVD. The product version you are uninstalling must match the product version on the DB2 DVD. If you do not provide the -b parameter when you run the db2_deinstall command from the DB2 DVD, you will be prompted for the installation path.
Use the db2ls command to see the list of installed DB2 products and features. If one or more instances are currently associated with a DB2 copy, that DB2 copy cannot be uninstalled.
You decide to uninstall all of the DB2 products that are part of DB2COPY1. When you attempt to uninstall the last DB2 product within DB2COPY1, because it is the default DB2 copy, the uninstall request will be unsuccessful.
Before uninstalling the last of the remaining DB2 products within the default DB2 copy, and if there is another DB2 copy on your system, you must switch the default from one DB2 copy to the other.
To change the default, use the db2swtch command with no arguments (Windows only) to start the Default DB2 and IBM Database Client Interface Selection wizard. The wizard will show all possible candidates when choosing a new default.
In this case, you can choose DB2COPY2 as the new default DB2 copy.
After you have made DB2COPY2 the default DB2 copy, you can request the uninstall of the last product in DB2COPY1.
Since DB2COPY1 is no longer the default DB2 copy, the uninstall request is successful.
Over time you can have several DSDRIVERs installed. Only one IBM database client interface copy is the default. At some point you might decide to uninstall the DSDRIVER that is the default IBM database client interface copy.
When you uninstall the default IBM database client interface copy, the database manager will choose between any of the remaining DSDRIVERs and pick one of them to be the new default IBM database client interface copy. Unless you switch the default before requesting the uninstall, you will not control which DSDRIVER will become the new default. (If there is only one other DSDRIVER besides the original default, then you will know which DSDRIVER the database manager will choose. If there are several DSDRIVERs installed besides the original default, then you will not know which DSDRIVER the database manager will choose.)
In the scenario presented here, DB2COPY1 is the default DB2 copy and IBMDBCL1 is the default IBM database client interface copy.
You decide to uninstall the DSDRIVER in IBMDBCL1.
As part of the uninstall request, the default IBM database client interface copy is switched by the database manager automatically so that DB2COPY1 becomes both the default DB2 copy and the default IBM database client interface copy. (This is also be true if there is more than one DB2 copy on the machine.)