Uninstall DB2 on Linux

[30/07/2008 20:50:46 ]

1. (Optional): Drop all databases. You can drop databases using the Control Center or the drop database command. Database files remain intact on your file systems when you drop an instance without dropping databases first.
  TIPS: run "db2cc &" after the instance user and don't forget to set the xhost and DISPLAY settings
   
2. Stop the DB2 Administration Server.
   a. Log in as the DB2 administration server owner.(the user "dasusr1" in the instruction document from IBM, "Up and Running with DB2 on Linux")
   b. Stop the DB2 administration server by entering the "db2admin stop" command.

3. Remove the DB2 Administration Server or run the "dasupdt" command to update the DB2 Administration Server to another installation path.
   a. Log in as a user with root authority.
   b. Stop the DAS: "db2admin stop"
   c. Remove the DAS by entering the following command:
      $DB2DIR/instance/dasdrop
      ($DB2DIR is the location you specified during the DB2 installation. The default installation path for UNIX® is /opt/IBM/db2/V9.5. The default installation path for Linux® is /opt/ibm/db2/V9.5)

4. Stop DB2 instances.
   a. Log in as a user with root authority.
   b. Obtain a list of the names of all DB2 instances associated with your current DB2 copy by entering the following command:
      $DB2DIR/bin/db2ilist
   c. Run the start up script. if it is not included in .profile.
      $INSTHOME/sqllib/db2profile       (bash, Bourne, or Korn shells)
      source $INSTHOME/sqllib/db2cshrc    (C shell)
      ($INSTHOME is the home directory of the instance users)
   d. It is recommended that you save the following files:
          * The database manager configuration file, $HOME/sqllib/db2systm
          * The node configuration file, $HOME/sqllib/db2nodes.cfg
          * User defined functions or fenced stored procedure applications in $HOME/sqllib/function
   e. Stop the DB2 database manager by entering the "db2stop force" command.
   f. Confirm that the instance is stopped by entering the "db2 terminate" command.
   g. Repeat these steps for each instance.

5. Remove DB2 instances or run the db2iupdt command to update the instances another installation path.
   a. Log in as a user with root authority.
   b. Optional: If you are certain you no longer need the data in the associated databases, you can remove the database files from the systems or drop the databases before dropping the instance.
   c. Remove the instance by entering the following command:
     $DB2DIR/instance/db2idrop InstName
     The db2idrop command removes the instance entry from the list of instances and removes the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance and where InstName is the login name of the instance. If you are storing any files in /sqllib directory, these files will be removed by this action. If you still need these files, you must make a copy of them before dropping the instance.
   d. Optional: As a user with root 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.
  
6. Remove DB2 products.
   a. Log in as the root user.
   b. To remove all installed DB2 products in the current location, run the "db2_deinstall -a" command from the $DB2DIR/install directory
     More information could be found with the "db2_deinstall -h" command

Reference Links:
Uninstalling your DB2 product (Linux and UNIX) -> http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.server.doc/doc/t0007439.html
The book "Up and Running with DB2 on Linux" link -> http://www.redbooks.ibm.com/abstracts/sg246899.html?Open

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14210591/viewspace-414930/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14210591/viewspace-414930/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值