Monday 7 March 2016

Db2 uninstallation

The deinstallation process cannot continue while there are DB2 instances related to the current DB2 copy.
If you need to move up or down a level from this DB2 level, use the installFixPack command from the DB2 image for the level you desire to move to, which will update this copy.
If you are only trying to uninstall this DB2 copy, you must either drop the related instances first, or you can update the instances to another DB2 copy which is at the same version as this DB2 copy, then restart the db2_deinstall command.

A major error occurred during the execution that caused this program to
terminate prematurely. If the problem persists, contact your technical service
representative.

For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.48257".

Fix : -   I face this error during db2 database uninstlallation, I was doing very silly mistake that is
            running uninstaller from Db2 instillation binaries because there was also available script of db2 uninstallation but Uninstallation Script should run from Db2 installation path only.
follow below steps


  1. Remove the Database Administration Server. Switch to the DAS owner (dasusr1 by default), either through the su - dasusr1 command or by logging in to the system directly as the DAS user, and issue the command db2admin stop. Then switch to the root user, and issue the /opt/ibm/db2/V9.7/instance/dasdrop command.
  2. Remove the DB2 instance(s). Switch to the instance owner (db2inst1 by default), either through the su - db2inst1 command or by logging in to the system directly as the instance user, and issue the command db2stop. Then, as root, remove the instance by issuing the /opt/ibm/db2/V9.7/instance/db2idrop db2_instance command, where db2_instance refers to the actual instance name you want to drop (for example, /opt/ibm/db2/V9.1/instance/db2idrop db2inst1). If you want to verify which instances are present on your system, run the /opt/ibm/db2/V9.7/instance/db2ilist command.
  3. Remove the software installation. As root, run the /opt/ibm/db2/V9.7/install/db2_deinstall -a command. This will remove the installation of DB2 from your system.
  4. If no longer need the DB2 database files (which are kept in the home directory of the instance owner), you can remove the users that were created during the installation of DB2 Express-C by entering these commands as root:
userdel -r db2inst1
userdel -r dasusr1
userdel -r db2fenc1

No comments:

Post a Comment