现在的位置: 首页 > 综合 > 正文

用命令行卸载 DB2

2017年05月22日 ⁄ 综合 ⁄ 共 2507字 ⁄ 字号 评论关闭

Log in as root.

List all DB2 instances:

bash# /usr/IBMdb2/V7.1/instance/db2ilist

stop db2 

 db2stop

Drop each instance listed in the previous step with the following command:
bash# /usr/ibmdb2/v7.1/instance/db2idrop instance-name

Drop the DB2 administration server:
bash# /usr/IBMdb2/V7.1/instance/dasidrop `/usr/IBMdb2/V7.1/instance/dasilist`

Uninstall all of the DB2 packages on your system using the db2deinstall command on your DB2 CD-ROM:
bash# /mnt/cdrom/db2/db2_deinstall -n

 or  execute the following cmd:

db2unins -f

db2unins - Uninstall DB2 database product command

Uninstalls one or more DB2 database products. db2unins can be found both in the installation media and in a DB2 install copy on the system. If ran from the installation
media, only the -f-l-t and -? parameters
can be used. If ran from a DB2 install copy, all the options can be used.

Authorization

sysadm.

Required connection

None.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-db2unins----------------------------------------------------->

>--+------------------------------------------------------------------+-><
   +-+- -d--------------------------------------------+--+----------+-+   
   | '-+- -f-------------------------------+--+-----+-'  '- -l-- -t-' |   
   |   '- -p--products-- -u--response-file-'  '- -y-'                 |   
   '- -?--------------------------------------------------------------'   

Command parameters

Running the db2unins command without any of the -?-d-p or -u parameters
will result in the removal of all DB2 database products under the current installation directory.

-d
Displays the products that are installed in the current DB2 copy on the system. This option is only available when executed from an installed copy of a DB2 database product.
-f
Performs a brute force uninstallation of all DB2 database products on the system. The db2unins -f command can be issued from either the installation media or
an install copy on your machine. Your system will reboot when you successfully issue db2unins -f. It can only be issued if there are no DB2 products prior to version 9 installed on the system.
-p products
Specifies the products that should be uninstalled where products is a semicolon separated list of the abbreviations for DB2 database products
enclosed in double quotes. For example, -p “ESE”;“PE”;“QP”. This option is only available when executed from an installed copy of a DB2 database product.
-u response-file
Performs an uninstallation based on what is specified in response-file. This option is also used to perform a silent uninstallation and
is only available when executed from an installed copy of a DB2 database product.
-y
Ensures that no confirmation is done during the uninstallation process.
-l
Specifies the location of the log file.
-t
Turns on the trace functionality. The trace file will be used for debugging problems with the db2unins command.
-?
Displays help for the db2unins

抱歉!评论已关闭.