Uninstall DB2 on Linux from Command Line

来源:互联网 发布:npc数据库 编辑:程序博客网 时间:2024/04/27 14:51
Have you ever had to uninstalled DB2 on Linux ??  Unlike the GUI screen for installing DB2, there is no GUI screen for uninstalling. IBM must have figured if they don’t provide a GUI uninstall users won’t uninstall DB2 !!   Well…below are the command line method.  I recommend you taking a backup of the database before you uninstall just incase you felt like you needed them back.


1. Shutdown DB2 and DB2ADMIN by issuing  db2stop and db2admin stop


2. sudo to root, and change directory to /opt/db2/ibm/V9.7/instance  or to your db2 install path /instance.


3. using db2idrop command drop all the instances . Eg: db2idrop db2inst1. If you want t o see all the available instances execute db2ilist


4. change directory to /opt/db2/ibm/V9.7/install


5. execute db2_deinstall -a .  This will uninstall db2 installation from your linux system.


6. You can optionally remove the install , db2 home directory and db2 instance related userid.


rm -fR /opt/db2/ibm/V9.7
userdel -r db2inst1
userdel -r dasusr1

userdel -r db2fenc1


from: http://techsatwork.com/blog/?p=558

原创粉丝点击