利用11g自身工具deinstall卸载grid(rac集群环境下)

本文详细介绍如何使用 Oracle 提供的 deinstall 工具来卸载 Grid Infrastructure,并清理相关配置及文件。包括卸载前的检查步骤、网络配置清理、ASM 实例卸载等关键操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


1.首先以grid用户登录到deinstall目录下执./deinstall,根据提示敲模式回车

[grid@rac01 deinstall]$ pwd

/u01/app/grid/product/11.2.0/deinstall

[grid@rac01 deinstall]$ ./deinstall

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2014-05-30_04-02-41AM/logs/

 

############ ORACLE DEINSTALL & DECONFIG TOOL START ############

 

 

######################### CHECK OPERATION START #########################

## [START] Install check configuration ##

 

 

Checking for existence of the Oracle home location /u01/app/grid/product/11.2.0

Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster

Oracle Base selected for deinstall is: /u01/app/oracle

Checking for existence of central inventory location /u01/app/oraInventory

Checking for existence of the Oracle Grid Infrastructure home /u01/app/grid/product/11.2.0

The following nodes are part of this cluster: rac01,rac02

Checking for sufficient temp space availability on node(s) : 'rac01,rac02'

 

## [END] Install check configuration ##

 

Traces log file: /tmp/deinstall2014-05-30_04-02-41AM/logs//crsdc.log

Enter an address or the name of the virtual IP used on node "rac01"[rac01-vip]

 > 

 

The following information can be collected by running "/sbin/ifconfig -a" on node "rac01"

Enter the IP netmask of Virtual IP "192.168.1.213" on node "rac01"[255.255.255.0]

 > 

 

Enter the network interface name on which the virtual IP address "192.168.1.213" is active

 > 

 

Enter an address or the name of the virtual IP used on node "rac02"[rac02-vip]

 > 

 

The following information can be collected by running "/sbin/ifconfig -a" on node "rac02"

Enter the IP netmask of Virtual IP "192.168.1.214" on node "rac02"[255.255.255.0]

 > 

 

Enter the network interface name on which the virtual IP address "192.168.1.214" is active

 > 

 

Enter an address or the name of the virtual IP[]

 > 

rac01-vip

The following information can be collected by running "/sbin/ifconfig -a" on node "rac01"

Enter the IP netmask of the virtual IP "rac01-vip"[]

 > 

255.255.255.0

Enter the network interface name on which the virtual IP address "rac01-vip" is active

 > 

 

Enter an address or the name of the virtual IP[]

 > 

 

 

Network Configuration check config START

 

Network de-configuration trace file location: /tmp/deinstall2014-05-30_04-02-41AM/logs/netdc_check2014-05-30_04-05-33-AM.log

 

Specify all RAC listeners (do not include SCAN listener) that are to be de-configured [LISTENER,LISTENER_SCAN1]:

 

Network Configuration check config END

 

Asm Check Configuration START

 

ASM de-configuration trace file location: /tmp/deinstall2014-05-30_04-02-41AM/logs/asmcadc_check2014-05-30_04-05-38-AM.log

 

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y

Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/grid/product/11.2.0.

ASM Diagnostic Destination : /u01/app/grid/product/11.2.0/log

ASM Diskgroups : +CRS

ASM diskstring : <Default>

Diskgroups will be dropped

De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).

 If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you  want to modify above information (y|n) [n]:  

 

######################### CHECK OPERATION END #########################

 

 

####################### CHECK OPERATION SUMMARY #######################

Oracle Grid Infrastructure Home is: /u01/app/grid/product/11.2.0

The cluster node(s) on which the Oracle home deinstallation will be performed are:rac01,rac02

Oracle Home selected for deinstall is: /u01/app/grid/product/11.2.0

Inventory Location where the Oracle home registered is: /u01/app/oraInventory

Following RAC listener(s) will be de-configured: LISTENER,LISTENER_SCAN1

ASM instance will be de-configured from this Oracle home

Do you want to continue (y - yes, n - no)? [n]: y

A log of this session will be written to: '/tmp/deinstall2014-05-30_04-02-41AM/logs/deinstall_deconfig2014-05-30_04-02-58-AM.out'

Any error messages from this session will be written to: '/tmp/deinstall2014-05-30_04-02-41AM/logs/deinstall_deconfig2014-05-30_04-02-58-AM.err'

 

######################## CLEAN OPERATION START ########################

ASM de-configuration trace file location: /tmp/deinstall2014-05-30_04-02-41AM/logs/asmcadc_clean2014-05-30_04-06-29-AM.log

ASM Clean Configuration START

ASM Clean Configuration END

 

Network Configuration clean config START

 

Network de-configuration trace file location: /tmp/deinstall2014-05-30_04-02-41AM/logs/netdc_clean2014-05-30_04-06-30-AM.log

 

De-configuring RAC listener(s): LISTENER,LISTENER_SCAN1

 

De-configuring listener: LISTENER

    Stopping listener: LISTENER

    Warning: Failed to stop listener. Listener may not be running.

Listener de-configured successfully.

 

De-configuring listener: LISTENER_SCAN1

    Stopping listener: LISTENER_SCAN1

    Warning: Failed to stop listener. Listener may not be running.

Listener de-configured successfully.

 

De-configuring Naming Methods configuration file on all nodes...

Naming Methods configuration file de-configured successfully.

 

De-configuring Local Net Service Names configuration file on all nodes...

Local Net Service Names configuration file de-configured successfully.

 

De-configuring Directory Usage configuration file on all nodes...

Directory Usage configuration file de-configured successfully.

 

De-configuring backup files on all nodes...

Backup files de-configured successfully.

 

The network configuration has been cleaned up successfully.

 

Network Configuration clean config END

 

 

---------------------------------------->

注意这个提示,我们需要将默认生成的命令根据提示在不同节点以root用户身份登录去执行。

The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on  the local node after the execution completes on all the remote nodes.

 

Run the following command as the root user or the administrator on node "rac02".

 

/tmp/deinstall2014-05-30_04-02-41AM/perl/bin/perl -I/tmp/deinstall2014-05-30_04-02-41AM/perl/lib -I/tmp/deinstall2014-05-30_04-02-41AM/crs/install /tmp/deinstall2014-05-30_04-02-41AM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-05-30_04-02-41AM/response/deinstall_Ora11g_gridinfrahome1.rsp"

 

Run the following command as the root user or the administrator on node "rac01".

 

/tmp/deinstall2014-05-30_04-02-41AM/perl/bin/perl -I/tmp/deinstall2014-05-30_04-02-41AM/perl/lib -I/tmp/deinstall2014-05-30_04-02-41AM/crs/install /tmp/deinstall2014-05-30_04-02-41AM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-05-30_04-02-41AM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode

 

Press Enter after you finish running the above commands

 

<----------------------------------------

这里基本都是默认自动执行了

Setting the force flag to false

Setting the force flag to cleanup the Oracle Base

Oracle Universal Installer clean START

 

Detach Oracle home '/u01/app/grid/product/11.2.0' from the central inventory on the local node : Done

 

Delete directory '/u01/app/grid/product/11.2.0' on the local node : Done

 

Delete directory '/u01/app/oraInventory' on the local node : Done

 

Delete directory '/u01/app/oracle' on the local node : Done

 

Detach Oracle home '/u01/app/grid/product/11.2.0' from the central inventory on the remote nodes 'rac02' : Done

 

Delete directory '/u01/app/grid/product/11.2.0' on the remote nodes 'rac02' : Done

 

Delete directory '/u01/app/oraInventory' on the remote nodes 'rac02' : Done

 

Delete directory '/u01/app/oracle' on the remote nodes 'rac02' : Done

 

Oracle Universal Installer cleanup was successful.

 

Oracle Universal Installer clean END

 

 

## [START] Oracle install clean ##

 

Clean install operation removing temporary directory '/tmp/deinstall2014-05-30_04-02-41AM' on node 'rac01'

Clean install operation removing temporary directory '/tmp/deinstall2014-05-30_04-02-41AM' on node 'rac02'

 

## [END] Oracle install clean ##

 

 

######################### CLEAN OPERATION END #########################

 

 

####################### CLEAN OPERATION SUMMARY #######################

ASM instance was de-configured successfully from the Oracle home

Following RAC listener(s) were de-configured successfully: LISTENER,LISTENER_SCAN1

Oracle Clusterware is stopped and successfully de-configured on node "rac02"

Oracle Clusterware is stopped and successfully de-configured on node "rac01"

Oracle Clusterware is stopped and de-configured successfully.

Successfully detached Oracle home '/u01/app/grid/product/11.2.0' from the central inventory on the local node.

Successfully deleted directory '/u01/app/grid/product/11.2.0' on the local node.

Successfully deleted directory '/u01/app/oraInventory' on the local node.

Successfully deleted directory '/u01/app/oracle' on the local node.

Successfully detached Oracle home '/u01/app/grid/product/11.2.0' from the central inventory on the remote nodes 'rac02'.

Successfully deleted directory '/u01/app/grid/product/11.2.0' on the remote nodes 'rac02'.

Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'rac02'.

Successfully deleted directory '/u01/app/oracle' on the remote nodes 'rac02'.

Oracle Universal Installer cleanup was successful.

 

 

Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'rac01,rac02' at the end of the session.

 

Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'rac01,rac02' at the end of the session.

Oracle deinstall tool successfully cleaned up temporary directories.

#######################################################################

 

 

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

 

在这里我需要告诉大家的是卸载grid完成之后,默认的gridoracle的密码无效了,需要重新修改,cvuqdisk包也被自动卸载了需要重新安装。接下来重新执行root..sh脚本就不会报错了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值