卸载db2 v9.7 ~ V10.5

本文详细介绍了如何在Unix/Linux和Windows系统中卸载和删除DB2数据库,包括从数据库到实例、das、用户等各层级的删除步骤,并提供了在不同操作系统环境下执行卸载操作的命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 cyper: Ubuntu 12.04LTS测试通过

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

db2unins

删除目录C:/DB2
删除目录:C:\ProgramData\IBM\DB2
删除目录C:/program files/SQLLIB如果存在(我的是c:/IBM/SQLLIB),

 

## 2017更新, 直接使用db2_deinstall删除db2

参考: 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
.

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:

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.

转载于:https://my.oschina.net/uniquejava/blog/283401

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值