Fully uninstall DB2 on Windows and UNIX/Linux platforms

Source: Internet
Author: User

Windows Platform

Steps required to thoroughly remove DB2 from Windows. This task should be executed only when you no longer need an existing DB2 instance or database.

If you are detaching the default copy of DB2 and you have other copies of DB2 on the system, you should use the db2swtch command to select a new default copy before resuming the detaching. Also, if the database management server (DAS) is running under the copy to be removed, the DAS should be moved to the copy that will not be removed. Otherwise, you will have to use the db2admin create command to recreate the DAS after uninstalling it, and may have to reconfigure the DAS to make some functions work.

Process

To remove DB2 from Windows:

1. Delete all databases. You can use the "control center" or drop database Command to delete a database. If the database is deleted, all data will be lost.

2. Stop all DB2 processes and services. You can use the "service" Panel of Windows or issue the db2stop command to complete this task. If you try to remove the DB2 product without stopping the DB2 service and process, you will receive a warning that contains a list of processes and services with DB2 DLL stored in the memory.

3. You can use the following two options to remove DB2 products: Add/delete programs can be accessed through the "control panel" of Windows, and use the "Add/delete programs" window to remove DB2 products. For more information about removing software products from Windows, see operating system help. The db2unins command can run the db2unins command to remove DB2 products. You can use this command to uninstall multiple DB2 products when the/p parameter is added. You can also use the/u parameter to silently uninstall the DB2 product, which removes the DB2 product specified in the response file. For more information, see the topic of the db2unins command.

However, using the "Add/delete programs" function in the "control panel" or using the db2unins/p command or the db2unins/u command does not always remove DB2 products. The following uninstall option should be used only when all of the above methods fail.

To forcibly remove all DB2 copies in Windows, run the db2unins/f command. This command forcibly uninstalls all DB2 copies on the system. All resources except user data (for example, DB2 database) will be forcibly deleted.

The command for my mountain village is as follows:

1 set db2instance = db2

2 db2 list db directory

3 db2 drop db xxx

4 db2idrop db21

5 set db2instance = db222

6 db2 list db directory

7 db2 drop db xxx

8. db2admin

9 db2admin stop

10 db2admin drop

Restart is very important:

Finally, restart the computer system and uninstall it. You can reinstall DB2 or other software on this computer.

  • 1
  • 2
  • Next Page

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.