Remove DB2 on Linux

在给客户部署程序时遇到了这个问题,为了测试专门在本机的虚拟机上安装并移除之,过程是这样的:

Remove DB

su - db2inst1
db2 list db directory
db2 drop db <db name>

Remove Instance

su - root
cd <db2 dir>/instance
./db2ilist
./db2idrop <instance name>

Remove das

su - root
cd <db2 dir>/instance
./daslist
./dasdrop <das user>

Uninstall

su - root
cd <db2 dir>/install
./db2_deinstall -a

Remove user (db2inst1,db2fenc1,dasusr1)

userdel -r <username>