卸載db2 v9.7 ~ V10.5

Following are the steps to remove DB2 from Unix/Linux:html

 cyper: Ubuntu 12.04LTS測試經過sql

1.Remove DB[首先刪除數據庫]
(1)su - db2inst1
(2)db2 list db directory
(3)db2 drop db <db name>
2.Remove Instance【刪除實例】
(1)su - root
(2)cd <db2 dir>/instance
(3)./db2ilist
(4)./db2idrop -f <instance name>
3.Remove das【刪除das】
(1)su - root
(2)cd <db2 dir>/instance
(3)./daslist
(4)./dasdrop <das user>
4.Uninstall【卸載】
(1)su - root
(2)cd <db2 dir>/install
(3)./db2_deinstall -a
5.Remove user ( db2inst1,db2fenc1,dasusr1)【刪除用戶】
userdel -r <username>
please lookinto the file /etc/passwd before and after you deleted users
 數據庫

Cyper windows7下:
1)DB2命令窗口 - Administrator
C:\IBM\SQLLIB\BIN>

db2 list db directory
db2start
db2 drop database <database name>

db2stop
db2ilist
db2idrop DB2

db2uninswindows

刪除目錄C:/DB2
刪除目錄:C:\ProgramData\IBM\DB2
刪除目錄C:/program files/SQLLIB若是存在(個人是c:/IBM/SQLLIB),測試

 

## 2017更新, 直接使用db2_deinstall刪除db2ui

參考: https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0023670.html

最終使用了/opt/ibm/db2/v10.5/install/db2_deinstall -a
.this

Example

To uninstall all the DB2 database products that are installed in a location (DB2DIR), issue the db2_deinstall command located in the DB2DIR/install directory:spa

DB2DIR/install/db2_deinstall -a

Usage notes

  • If you run db2_deinstall -a -f sqllib, the $HOME/sqllib directory will be removed. Be certain to backup any files, that require saving, from this directory prior to running the command.
相關文章
相關標籤/搜索