To uninstall or remove DB2 do the following steps,
1: Log in with root user.
2. List out all DB2 instances. To list the db2 instances, Do the following
#cd /opt/IBM/db2/V8.1/instance
the above folder will be applicable for system with Unix/ Linux based OS
# db2ilist
- which lists the all the instances of db2.
3. Drop each instance listed in the above step with the following command
#db2idrop instance name
4. Drop the DB2 administration server (DAS) with the following command
#cd /opt/IBM/db2/V8.1/instance
# dasdrop dasusr1 where dasusr1 is the dasuser name.
5. Uninstall all of the DB2 packages on your system using the db2deinstall command on your DB2 CD-ROM
Issue the following commands.
# /mnt/cdrom/db2/db2_deinstall -n
OR do the following steps to remove DB2
1) Drop all databases by using DROP command or Contro Center.
(2) Deinstall DB2 packages on your system by running db2_deinstall file from DB2 CD
(3) Go to /home directory and remove the directories dasusr1,db2fenc1,db2inst1
(4) Remove the directory db2 and its sub directories from the /opt/IBM directory
(5) Open the file /etc/services and remove the line containing ‘ db2c_db2inst1 50001/tcp ‘ and then save the file
(5) Open the file /etc/passwd and remove the lines starting with dasusr1,db2fenc1,db2inst1 and save the file. Make sure these will be three lines starting with above said user names
(6) Remove the folder DB2 from /var.
(7) Reboot the server and then reinstall the DB2 again using typical option
0 comments:
Post a Comment