Oracle 11g RAC 卸载CRS步骤

Oracle 11g之后提供了卸载griddatabase的脚本,可以卸载的比较干净,不需要手动删除crs 

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

1.root用户进入到grid的ORACLE_HOME(只在一个节点上执行即可)

说明:(如果没有从官网上下载)

1.从oracle官方网站上下载的deinstall工具

11GR2有7个下载包,deinstall放在第7个下载包,如11.2.0.2的下载包为p10098816_112020_AIX64-5L_7of7.zip

2.解压到本地目录,并执行deinstall

需要输入$ORACLE_HOME

bash-3.00$ ./deinstall  -home /oracle/grid/product/11.2.0/grid

Location of logs /ora11g/server_install/deinstall/./logs/

 

root用户执行:

[root@testdb11a ~]# cd /u01/app/11.2.0/grid/crs/install/
[root@testdb11a install]# ./rootcrs.pl -verbose -deconfig -force
Using configuration parameter file: ./crsconfig_params
Network exists: 1/192.168.1.0/255.255.255.0/eth0, type static
VIP exists: /testdb11a-vip/192.168.1.22/192.168.1.0/255.255.255.0/eth0, hosting node testdb11a
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop ora.registry.acfs on testdb11a
CRS-2677: Stop of ora.registry.acfs on testdb11a succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on testdb11a
CRS-2673: Attempting to stop ora.crsd on testdb11a
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on testdb11a
CRS-2673: Attempting to stop ora.oc4j on testdb11a
CRS-2673: Attempting to stop ora.DATA.dg on testdb11a
CRS-2677: Stop of ora.oc4j on testdb11a succeeded
CRS-2677: Stop of ora.DATA.dg on testdb11a succeeded
CRS-2673: Attempting to stop ora.asm on testdb11a
CRS-2677: Stop of ora.asm on testdb11a succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on testdb11a has completed
CRS-2677: Stop of ora.crsd on testdb11a succeeded
CRS-2673: Attempting to stop ora.mdnsd on testdb11a
CRS-2673: Attempting to stop ora.drivers.acfs on testdb11a
CRS-2673: Attempting to stop ora.crf on testdb11a
CRS-2673: Attempting to stop ora.ctssd on testdb11a
CRS-2673: Attempting to stop ora.evmd on testdb11a
CRS-2673: Attempting to stop ora.asm on testdb11a
CRS-2677: Stop of ora.crf on testdb11a succeeded
CRS-2677: Stop of ora.evmd on testdb11a succeeded
CRS-2677: Stop of ora.mdnsd on testdb11a succeeded
CRS-2677: Stop of ora.ctssd on testdb11a succeeded
CRS-2677: Stop of ora.drivers.acfs on testdb11a succeeded
CRS-2677: Stop of ora.asm on testdb11a succeeded
CRS-2673: Attempting to stop ora.cluster_interconnect.haip on testdb11a
CRS-2677: Stop of ora.cluster_interconnect.haip on testdb11a succeeded
CRS-2673: Attempting to stop ora.cssd on testdb11a
CRS-2677: Stop of ora.cssd on testdb11a succeeded
CRS-2673: Attempting to stop ora.gipcd on testdb11a
CRS-2677: Stop of ora.gipcd on testdb11a succeeded
CRS-2673: Attempting to stop ora.gpnpd on testdb11a
CRS-2677: Stop of ora.gpnpd on testdb11a succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on testdb11a has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node
[root@testdb11a install]# ./crsconfig_params

 

2.grid用户执行deinstall进行卸载(两个节点)

主节点执行结果:

+ASM1@testdb11a  /u01/app/11.2.0/grid/deinstall$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2014-09-16_01-45-52PM/logs/

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


######################### CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/11.2.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home 
The following nodes are part of this cluster: testdb11a,testdb11b
Checking for sufficient temp space availability on node(s) : testdb11a,testdb11b

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2014-09-16_01-45-52PM/logs//crsdc.log
Enter an address or the name of the virtual IP used on node "testdb11a"[testdb11a-vip]
 > 

The following information can be collected by running "/sbin/ifconfig -a" on node "testdb11a"
Enter the IP netmask of Virtual IP "192.168.1.22" on node "testdb11a"[255.255.255.0]
 > 

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

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

The following information can be collected by running "/sbin/ifconfig -a" on node "testdb11b"
Enter the IP netmask of Virtual IP "192.168.1.23" on node "testdb11b"[255.255.255.0]
 > 

Enter the network interface name on which the virtual IP address "192.168.1.23" 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-09-16_01-45-52PM/logs/netdc_check2014-09-16_01-46-51-PM.log

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

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2014-09-16_01-45-52PM/logs/asmcadc_check2014-09-16_01-46-54-PM.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
Is OCR/Voting Disk placed in ASM y|n [n]: y

Enter the OCR/Voting Disk diskgroup name []: 
Specify the ASM Diagnostic Destination [ ]: 
Specify the diskstring []: 
Specify the diskgroups that are managed by this ASM instance []: 


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


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: 
The cluster node(s) on which the Oracle home deinstallation will be performed are:testdb11a,testdb11b
Oracle Home selected for deinstall is: /u01/app/11.2.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following RAC listener(s) will be de-configured: 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-09-16_01-45-52PM/logs/deinstall_deconfig2014-09-16_01-46-31-PM.out
Any error messages from this session will be written to: /tmp/deinstall2014-09-16_01-45-52PM/logs/deinstall_deconfig2014-09-16_01-46-31-PM.err

######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2014-09-16_01-45-52PM/logs/asmcadc_clean2014-09-16_01-47-32-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2014-09-16_01-45-52PM/logs/netdc_clean2014-09-16_01-47-37-PM.log

De-configuring RAC listener(s): LISTENER_SCAN1

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


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

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 "testdb11b".

/tmp/deinstall2014-09-16_01-45-52PM/perl/bin/perl -I/tmp/deinstall2014-09-16_01-45-52PM/perl/lib -I/tmp/deinstall2014-09-16_01-45-52PM/crs/install /tmp/deinstall2014-09-16_01-45-52PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp"

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

/tmp/deinstall2014-09-16_01-45-52PM/perl/bin/perl -I/tmp/deinstall2014-09-16_01-45-52PM/perl/lib -I/tmp/deinstall2014-09-16_01-45-52PM/crs/install /tmp/deinstall2014-09-16_01-45-52PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode

Press Enter after you finish running the above commands

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

打开另外一个终端窗口,在节点1和节点二下root用户执行上面的两条命令

节点一

[root@testdb11a ~]# /tmp/deinstall2014-09-16_01-45-52PM/perl/bin/perl -I/tmp/deinstall2014-09-16_01-45-52PM/perl/lib -I/tmp/deinstall2014-09-16_01-45-52PM/crs/install /tmp/deinstall2014-09-16_01-45-52PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode
Using configuration parameter file: /tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp
Adding Clusterware entries to inittab
/crs/install/inittab does not exist.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Delete failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Modify failed, or completed with errors.
Adding Clusterware entries to inittab
/crs/install/inittab does not exist.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Delete failed, or completed with errors.
crsctl delete for vds in DATA ... failed
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Delete failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
ACFS-9313: No ADVM/ACFS installation detected.
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Failure in execution (rc=-1, 256, No such file or directory) for command /etc/init.d/ohasd deinstall
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

 

节点二

[root@testdb11b ~]# /tmp/deinstall2014-09-16_01-45-52PM/perl/bin/perl -I/tmp/deinstall2014-09-16_01-45-52PM/perl/lib -I/tmp/deinstall2014-09-16_01-45-52PM/crs/install /tmp/deinstall2014-09-16_01-45-52PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp"
Using configuration parameter file: /tmp/deinstall2014-09-16_01-45-52PM/response/deinstall_Ora11g_gridinfrahome1.rsp
Network exists: 1/192.168.1.0/255.255.255.0/eth0, type static
VIP exists: /testdb11b-vip/192.168.1.23/192.168.1.0/255.255.255.0/eth0, hosting node testdb11b
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on testdb11b
CRS-2673: Attempting to stop ora.crsd on testdb11b
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on testdb11b
CRS-2673: Attempting to stop ora.asm on testdb11b
CRS-2677: Stop of ora.asm on testdb11b succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on testdb11b has completed
CRS-2677: Stop of ora.crsd on testdb11b succeeded
CRS-2673: Attempting to stop ora.mdnsd on testdb11b
CRS-2673: Attempting to stop ora.drivers.acfs on testdb11b
CRS-2673: Attempting to stop ora.ctssd on testdb11b
CRS-2673: Attempting to stop ora.evmd on testdb11b
CRS-2673: Attempting to stop ora.asm on testdb11b
CRS-2677: Stop of ora.evmd on testdb11b succeeded
CRS-2677: Stop of ora.mdnsd on testdb11b succeeded
CRS-2677: Stop of ora.ctssd on testdb11b succeeded
CRS-2677: Stop of ora.drivers.acfs on testdb11b succeeded
CRS-2677: Stop of ora.asm on testdb11b succeeded
CRS-2673: Attempting to stop ora.cluster_interconnect.haip on testdb11b
CRS-2677: Stop of ora.cluster_interconnect.haip on testdb11b succeeded
CRS-2673: Attempting to stop ora.cssd on testdb11b
CRS-2677: Stop of ora.cssd on testdb11b succeeded
CRS-2673: Attempting to stop ora.crf on testdb11b
CRS-2677: Stop of ora.crf on testdb11b succeeded
CRS-2673: Attempting to stop ora.gipcd on testdb11b
CRS-2677: Stop of ora.gipcd on testdb11b succeeded
CRS-2673: Attempting to stop ora.gpnpd on testdb11b
CRS-2677: Stop of ora.gpnpd on testdb11b succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on testdb11b has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node

 

执行完成之后在原窗口按回车继续

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/11.2.0/grid from the central inventory on the local node : Done

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

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

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

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

Delete directory /u01/app/11.2.0/grid on the remote nodes testdb11b : Done

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

Delete directory /u01/app/grid on the remote nodes testdb11b : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory /tmp/deinstall2014-09-16_01-45-52PM on node testdb11a
Clean install operation removing temporary directory /tmp/deinstall2014-09-16_01-45-52PM on node testdb11b

## [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_SCAN1
Oracle Clusterware is stopped and successfully de-configured on node "testdb11b"
Oracle Clusterware is stopped and successfully de-configured on node "testdb11a"
Oracle Clusterware is stopped and de-configured successfully.
Successfully detached Oracle home /u01/app/11.2.0/grid from the central inventory on the local node.
Successfully deleted directory /u01/app/11.2.0/grid on the local node.
Successfully deleted directory /u01/app/oraInventory on the local node.
Successfully deleted directory /u01/app/grid on the local node.
Successfully detached Oracle home /u01/app/11.2.0/grid from the central inventory on the remote nodes testdb11b.
Successfully deleted directory /u01/app/11.2.0/grid on the remote nodes testdb11b.
Successfully deleted directory /u01/app/oraInventory on the remote nodes testdb11b.
Successfully deleted directory /u01/app/grid on the remote nodes testdb11b.
Oracle Universal Installer cleanup was successful.


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

Run rm -rf /opt/ORCLfmap as root on node(s) testdb11a,testdb11b at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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

 

显示成功,现在把所有的crs服务停止,所有有关的文件都已经删除。

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。