linux下unstalling db2

由于enterprise版本又到期了,又不想改系统日期,所以重装。

参考:
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp

1 Optional: Drop all databases. You can drop databases using the Control Center (on Linux platforms only) or the drop database command. Database files remain intact on your file systems when you drop an instance without dropping databases first.
因为已经到期,数据库无法启动,就drop不了了。

2 Stop the DB2 Administration Server.

   #. Log in as the DB2 administration server owner.
   #. Stop the DB2 administration server by entering the db2admin stop command.

没有das,跳过

3.Removing the DB2 administration server
# Log in as a user with root user authority.
# Stop the DB2 administration server.
# Remove the DB2 administration server by entering the following command:

  1. --注意使用root运行  
   2. [root@localhost ~]# /opt/ibm/db2/V9.7/instance/dasdrop   
   3. DBI1104E  The Administration Server cannot be dropped.  
   4.   
   5. Explanation:   
   6.   
   7. An attempt to drop the Administration Server failed. The system detects  
   8. that the Administration Server does not exist.  
   9.   
  10. User response:   
  11.   
  12. No action required.  
  13.   
  14.   
  15. DBI1079I  Output is saved in the log file /tmp/dasdrop.log.28479.  
  16.   
  17. Explanation:   
  18.   
  19. All processed and failed operations have been saved into this log file.  
  20.   
  21. User response:   
  22.   
  23. Do not modify this file in any way. This file is for IBM Technical  
  24. Support reference.  
  25. --因为没有,所以删除失败,继续  

--注意使用root运行
[root@localhost ~]# /opt/ibm/db2/V9.7/instance/dasdrop  
DBI1104E  The Administration Server cannot be dropped.

Explanation:

An attempt to drop the Administration Server failed. The system detects
that the Administration Server does not exist.

User response:

No action required.

DBI1079I  Output is saved in the log file /tmp/dasdrop.log.28479.

Explanation:

All processed and failed operations have been saved into this log file.

User response:

Do not modify this file in any way. This file is for IBM Technical
Support reference.
--因为没有,所以删除失败,继续

4.Stopping DB2 instances
# Log in as a user with root user authority.
# To obtain a list of the names of all DB2 instances associated with your current DB2 copy, enter the following command:

  1. [root@localhost ~]# /opt/ibm/db2/V9.7/bin/db2ilist   
   2. db2inst1  

[root@localhost ~]# /opt/ibm/db2/V9.7/bin/db2ilist
db2inst1

# Log out.
# Log back in as the owner of the instance you want to stop.
# Run the start up script if it is not included in .profile.

   1. [db2inst1@localhost ~]$ sqllib/db2profile   

[db2inst1@localhost ~]$ sqllib/db2profile

# You might want to save the database manager configuration file, db2systm, the db2nodes.cfg file, or user defined function or fenced stored procedure applications in INSTHOME/sqllib/function.
# Stop the DB2 database manager by entering the db2stop force command.
# Confirm that the instance is stopped by entering the db2 terminate command.
# Repeat these steps for each instance.

   1. [db2inst1@localhost ~]$ db2stop force  --强制关闭数据库  
   2. SQL1032N  No start database manager command was issued.  
   3. [db2inst1@localhost ~]$ db2 terminate    --断开连接  
   4. DB20000I  The TERMINATE command completed successfully.  

[db2inst1@localhost ~]$ db2stop force  --强制关闭数据库
SQL1032N  No start database manager command was issued.
[db2inst1@localhost ~]$ db2 terminate    --断开连接
DB20000I  The TERMINATE command completed successfully.

5.Remove DB2 instances.
# Log in as a user with root user authority.
# Remove the instance by entering the following command:

  1. [root@localhost ~]# /opt/ibm/db2/V9.7/instance/db2idrop db2inst1  
   2. DBI1070I  Program db2idrop completed successfully.  

[root@localhost ~]# /opt/ibm/db2/V9.7/instance/db2idrop db2inst1
DBI1070I  Program db2idrop completed successfully.

# Optional: As a user with root user authority, remove the instance owner's user ID and group (if used only for that instance). Do not remove these if you are planning to re-create the instance.

Remove the database files from the systems or drop the databases before dropping the instance if you no longer need the databases. After dropping the instance the database files remain intact.

This step is optional since the instance owner and the instance owner group may be used for other purposes.
因为待会重装,所以不删这些

6.Remove DB2 products.

   #. Log in as user with root user authority.
   #. Access the path where the DB2 database products are located. To locate the path of the DB2 database product to remove, see Listing DB2 products installed on your system.
   #. Run the db2_deinstall -a command from the DB2DIR/install directory or the doce_deinstall -a command from the DB2DIR/doc/install directory, where DB2DIR is the location that you specified when you installed your DB2 database product.

  1. [root@localhost ~]# /opt/ibm/db2/V9.7/install/db2_deinstall -a  
   2. DBI1016I  Program db2_deinstall is performing uninstallation. Please  
   3.       wait.  
   4.   
   5.   
   6. The execution completed successfully.  
   7.   
   8. For more information see the DB2 uninstallation log at  
   9. "/tmp/db2_deinstall.log.1833".  
  10. --运行成功  
  11. [root@localhost opt]# du -sh *  
  12. 8.0K    ibm  
  13. --这时/opt下的ibm已经剩下8k了  

[root@localhost ~]# /opt/ibm/db2/V9.7/install/db2_deinstall -a
DBI1016I  Program db2_deinstall is performing uninstallation. Please
      wait.


The execution completed successfully.

For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.1833".
--运行成功
[root@localhost opt]# du -sh *
8.0K    ibm
--这时/opt下的ibm已经剩下8k了



到此,db2删除完成
参与3

1同行回答

twt423twt423研究学者江苏省
为什么要删除啊,db2为什么不学习oracle免费,这样多好。因为如果用在生产环境,肯定会花钱的显示全部

为什么要删除啊,db2为什么不学习oracle免费,这样多好。因为如果用在生产环境,肯定会花钱的

收起
互联网服务 · 2016-06-05
浏览1448

提问者

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2011-06-08
  • 关注会员:2 人
  • 问题浏览:3950
  • 最近回答:2016-06-05
  • X社区推广