itsbegin
作者itsbegin·2013-01-22 10:12
软件开发工程师·上海通联支付

【原创】如何删除一个已经存在的DB2环境

字数 3454阅读 2877评论 0赞 0
 
经过测试,删除一个DB2实例和数据库环境还是比较简单的,需要如下几个步骤:
 
1. 查看当前已经建立的实例
2. 根据查看结果删除实例环境(如果实例未关闭先关闭)
3. 如果存在DAS则同时删除掉
4. 通过安装程序db2_deinstall来删除安装程序等
 
root@linux11:/opt/softs/DB2/server# ./db2_deinstall -a
 
Enter full path name for the install directory -
 
------------------------------------------------
/opt/ibm/db2/V9.7
DBI1016I  Program db2_deinstall is performing uninstallation. Please  wait.
 
 
The deinstallation process cannot continue while there are DB2 instances related to the current DB2 copy.
If you need to move up or down a level from this DB2 level, use the installFixPack command from the DB2 image for the level you desire to move to, which will update this copy.
If you are only trying to uninstall this DB2 copy, you must either drop the related instances first, or you can update the instances to another DB2 copy which is at the same version as this DB2 copy, then restart the db2_deinstall command.
 
A major error occurred during the execution that caused this program to
terminate prematurely. If the problem persists, contact your technical service
representative.
 
For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.1070".
 
db2inst@linux11:~$ db2ilist
apsdbonl
etsdbonl
 
root@linux11:/opt/ibm/db2/V9.7/instance# db2idrop apsdbonl
DBI1070I  Program db2idrop completed successfully.
 
root@linux11:/opt/ibm/db2/V9.7/instance# db2idrop etsdbonl
DBI1070I  Program db2idrop completed successfully.
 
root@linux11:/opt/softs/DB2/server# ./db2_deinstall -a
 
Enter full path name for the install directory -
 
------------------------------------------------
/opt/ibm/db2/V9.7
DBI1016I  Program db2_deinstall is performing uninstallation. Please
      wait.
 
 
The DB2 installer detects the DAS is using the current DB2 copy to be uninstalled. The deinstallation process cannot continue.  If the deinstallation is moving up or down a DB2 level from the current DB2 installation, you need to use the installFixPack command from the DB2 images of the desired DB2 Level to update the current DB2 installation. If the purpose is to uninstall  a DB2 product from the current location with no desire to install it again to the same location, you need to drop the DAS or update the DAS to use another DB2 installation location of the same version and then rerun the command again to uninstall.
 
A major error occurred during the execution that caused this program to
terminate prematurely. If the problem persists, contact your technical service
representative.
 
For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.8153".
 
 
root@linux11:/opt/ibm/db2/V9.7/instance# dasdrop
-su: /home/dasusr/das/bin/db2admin: Permission denied
DBI1070I  Program dasdrop completed successfully.
 
root@linux11:/opt/ibm/db2/V9.7/instance# /opt/softs/DB2/server/db2_deinstall -a
 
Enter full path name for the install directory -
 
------------------------------------------------
/opt/ibm/db2/V9.7
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.9042".

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广