Full solution to the actual operation process of DB2 database detachment

Source: Internet
Author: User
Tags db2 connect db2 connect to

The following article mainly describes how to uninstall AIX from a DB2 database. I found a document on how to uninstall AIX from a DB2 database on a website, the following is a detailed description of the article, hoping to help you in this regard.

If you have successfully installed db2 and configured it in/. profile, the installation may fail again and you need to restore the/. profile configuration. You must have the root permission to uninstall the DB2 database.

1. delete a database

Su-db2inst1 (here, db2inst1 is an instance user)

Db2 list db directory (View All Database lists)

Db2 connect to db_name (connect to database)

Db2 drop db db_name (delete database)

Note: If you are prompted that The database is using The database currently using when you delete The database, you must stop The database before deleting it.

Db2stop force (force stop)

Db2start)

Db2 drop db db_name (delete database)

2. delete an instance

Su-db2inst1 (switch to instance user)

Db2inst1 stop (stop the management service, and db2inst1 is the Instance name)

Su-root (switch to root user)

Cd/opt/IBM/db2/V9.5/instance (switch to the instance directory)

./Dasdrop db2inst1 (delete Management Service)

./Db2idrop db2inst1 (delete instance)

Note: If you are prompted that the instance is running There are applications that are still running that are using the specified instance.) When you delete the instance, stop the instance and then delete it.

Su-db2inst1 (switch to instance user)

./Db2stop (stop instance)

Su-root

Cd/opt/IBM/db2/V9.5/instance

./Db2idrop db2inst1

3. Uninstall DB2

Cd/opt/IBM/db2/V9.5/install (switch to the installation directory)

./Db2_deinstall-a (DB2 database uninstallation)

Cd/opt/IBM/db2 (if there is no file in db2, It is uninstalled successfully)

Cd/opt

Rm-rf IBM (Force Delete IBM folder)

4. delete a user

Su-root

Smit user (delete the user as prompted)

Cd/home

Rm-rf db2inst1 (delete the user's home directory)

So far, the DB2 database has been uninstalled successfully. Pay attention to the user permissions during the uninstallation process.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.