卸载Oracle 11gR2 RAC

Oracle 11gR2 RAC的卸载,有了一个很好用的工具deinstall。刚好这两天有一个这样的机会,在此记录一下。

一 DBCA卸载数据库

/home/oracle> dbca

 

以上操作后,删除数据库。

二 Oracle用户执行deinstall

使用Oracle用户登录任意节点,执行deinstall

cd $ORACLE_HOME/deinstall

./deinstall

Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/TEST/grid/oraInventory/logs/

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


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


Checking for existence of the Oracle home location /u01/TEST/racdb/11.2.0
Oracle Home type selected for deinstall is: Oracle Real Application Cluster Database
Oracle Base selected for deinstall is: /u01/TEST/racdb
Checking for existence of central inventory location /u01/TEST/grid/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/TEST/grid/11.2.0
The following nodes are part of this cluster: test01,test02
Checking for sufficient temp space availability on node(s) : 'test01,test02'

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/netdc_check2014-01-13_09-55-53-AM.log

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


Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/databasedc_check2014-01-13_09-58-57-AM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home []:
Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/emcadc_check2014-01-13_09-59-41-AM.log

Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /u01/TEST/grid/oraInventory/logs//ocm_check6301.log
Oracle Configuration Manager check END

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


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/TEST/grid/11.2.0
The cluster node(s) on which the Oracle home deinstallation will be performed are:test01,test02

Oracle Home selected for deinstall is: /u01/TEST/racdb/11.2.0
Inventory Location where the Oracle home registered is: /u01/TEST/grid/oraInventory
Following RAC listener(s) will be de-configured: LISTENER_OFPRD
No Enterprise Manager configuration to be updated for any database(s)
No Enterprise Manager ASM targets to update
No Enterprise Manager listener targets to migrate
Checking the config status for CCR
test01 : Oracle Home exists with CCR directory, but CCR is not configured
test02 : Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y

A log of this session will be written to: '/u01/TEST/grid/oraInventory/logs/deinstall_deconfig2014-01-13_09-55-39-AM.out'
Any error messages from this session will be written to: '/u01/TEST/grid/oraInventory/logs/deinstall_deconfig2014-01-13_09-55-39-AM.err'

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

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/emcadc_clean2014-01-13_09-59-41-AM.log

Updating Enterprise Manager ASM targets (if any)
Updating Enterprise Manager listener targets (if any)
Enterprise Manager Configuration Assistant END
Database de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/databasedc_clean2014-01-13_10-01-17-AM.log

Network Configuration clean config START

Network de-configuration trace file location: /u01/TEST/grid/oraInventory/logs/netdc_clean2014-01-13_10-01-17-AM.log

De-configuring RAC listener(s): LISTENER_OFPRD

De-configuring listener: LISTENER_OFPRD
    Stopping listener: LISTENER_OFPRD
    Listener stopped successfully.
    Unregistering listener: LISTENER_OFPRD
    Listener unregistered successfully.
Listener de-configured successfully.

De-configuring Listener configuration file on all nodes...
Listener configuration file 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

Oracle Configuration Manager clean START
OCM clean log file location : /u01/TEST/grid/oraInventory/logs//ocm_clean6301.log
Oracle Configuration Manager clean END
Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/u01/TEST/racdb/11.2.0' from the central inventory on the local node : Done

Delete directory '/u01/TEST/racdb/11.2.0' on the local node : Done

The Oracle Base directory '/u01/TEST/racdb' will not be removed on local node. The directory is not empty.

Detach Oracle home '/u01/TEST/racdb/11.2.0' from the central inventory on the remote nodes 'test02' : Done

Delete directory '/u01/TEST/racdb/11.2.0' on the remote nodes 'test02' : Done

The Oracle Base directory '/u01/TEST/racdb' will not be removed on node 'test02'. The directory is not empty.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2014-01-13_09-54-38AM' on node 'test01'
Clean install operation removing temporary directory '/tmp/deinstall2014-01-13_09-54-38AM' on node 'test02'

## [END] Oracle install clean ##


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


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

Following RAC listener(s) were de-configured successfully: LISTENER_OFPRD
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/u01/TEST/racdb/11.2.0' from the central inventory on the local node.
Successfully deleted directory '/u01/TEST/racdb/11.2.0' on the local node.
Successfully detached Oracle home '/u01/TEST/racdb/11.2.0' from the central inventory on the remote nodes 'test02'.
Successfully deleted directory '/u01/TEST/racdb/11.2.0' on the remote nodes 'test02'.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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

至此oracle用户deinstall结束

三 执行rootcrs.pl

在除最后节点外的其他节点上运行rootcrs.pl -verbose -deconfig -force

root用户cd $GRID_HOME/crs/install

 ./rootcrs.pl -verbose -deconfig -force
Using configuration parameter file: ./crsconfig_params
Network exists: 1/10.16.1.0/255.255.255.0/en5, type static
VIP exists: /test01-vip/10.16.1.113/10.16.1.0/255.255.255.0/en5, hosting node test01
VIP exists: /test02-vip/10.16.1.114/10.16.1.0/255.255.255.0/en5, hosting node test02
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 'test01'
CRS-2673: Attempting to stop 'ora.crsd' on 'test01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'test01'
CRS-2673: Attempting to stop 'ora.ARCH_DG.dg' on 'test01'
CRS-2673: Attempting to stop 'ora.CRS_DG.dg' on 'test01'
CRS-2673: Attempting to stop 'ora.DATA01_DG.dg' on 'test01'
CRS-2677: Stop of 'ora.ARCH_DG.dg' on 'test01' succeeded
CRS-2677: Stop of 'ora.DATA01_DG.dg' on 'test01' succeeded
CRS-2677: Stop of 'ora.CRS_DG.dg' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'test01'
CRS-2677: Stop of 'ora.asm' on 'test01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'test01' has completed
CRS-2677: Stop of 'ora.crsd' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'test01'
CRS-2673: Attempting to stop 'ora.crf' on 'test01'
CRS-2673: Attempting to stop 'ora.ctssd' on 'test01'
CRS-2673: Attempting to stop 'ora.evmd' on 'test01'
CRS-2673: Attempting to stop 'ora.asm' on 'test01'
CRS-2677: Stop of 'ora.mdnsd' on 'test01' succeeded
CRS-2677: Stop of 'ora.crf' on 'test01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'test01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'test01' succeeded
CRS-2677: Stop of 'ora.asm' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'test01'
CRS-2677: Stop of 'ora.cssd' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'test01'
CRS-2677: Stop of 'ora.gipcd' on 'test01' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'test01'
CRS-2677: Stop of 'ora.gpnpd' on 'test01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'test01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node

在最后一个节点执行,rootcrs.pl -verbose -deconfig -force -lastnode

./rootcrs.pl -verbose -deconfig -force -lastnode
Using configuration parameter file: ./crsconfig_params
Network exists: 1/10.16.1.0/255.255.255.0/en5, type static
VIP exists: /test02-vip/10.16.1.114/10.16.1.0/255.255.255.0/en5, hosting node test02
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora.crsd' on 'test02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'test02'
CRS-2673: Attempting to stop 'ora.oc4j' on 'test02'
CRS-2673: Attempting to stop 'ora.ARCH_DG.dg' on 'test02'
CRS-2673: Attempting to stop 'ora.CRS_DG.dg' on 'test02'
CRS-2673: Attempting to stop 'ora.DATA01_DG.dg' on 'test02'
CRS-2677: Stop of 'ora.ARCH_DG.dg' on 'test02' succeeded
CRS-2677: Stop of 'ora.DATA01_DG.dg' on 'test02' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'test02' succeeded
CRS-2677: Stop of 'ora.CRS_DG.dg' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'test02'
CRS-2677: Stop of 'ora.asm' on 'test02' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'test02' has completed
CRS-2677: Stop of 'ora.crsd' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'test02'
CRS-2673: Attempting to stop 'ora.evmd' on 'test02'
CRS-2673: Attempting to stop 'ora.asm' on 'test02'
CRS-2677: Stop of 'ora.evmd' on 'test02' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'test02' succeeded
CRS-2677: Stop of 'ora.asm' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'test02'
CRS-2677: Stop of 'ora.cssd' on 'test02' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'test02'
CRS-2676: Start of 'ora.cssdmonitor' on 'test02' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'test02'
CRS-2672: Attempting to start 'ora.diskmon' on 'test02'
CRS-2676: Start of 'ora.diskmon' on 'test02' succeeded
CRS-2676: Start of 'ora.cssd' on 'test02' succeeded
CRS-4611: Successful deletion of voting disk +CRS_DG.
ASM de-configuration trace file location: /tmp/asmcadc_clean2014-01-13_10-30-06-AM.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /tmp/asmcadc_clean2014-01-13_10-30-06-AM.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'test02'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'test02'
CRS-2673: Attempting to stop 'ora.crf' on 'test02'
CRS-2673: Attempting to stop 'ora.ctssd' on 'test02'
CRS-2673: Attempting to stop 'ora.asm' on 'test02'
CRS-2677: Stop of 'ora.mdnsd' on 'test02' succeeded
CRS-2677: Stop of 'ora.crf' on 'test02' succeeded
CRS-2677: Stop of 'ora.asm' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test02' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'test02'
CRS-2677: Stop of 'ora.cssd' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'test02'
CRS-2677: Stop of 'ora.gipcd' on 'test02' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'test02'
CRS-2677: Stop of 'ora.gpnpd' on 'test02' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'test02' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node

四 grid用户执行deinstall

使用grid用户登录任意节点,执行deinstall,

cd $GRID_HOME/deinstall

./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2014-01-13_10-36-10AM/logs/

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


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


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

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2014-01-13_10-36-10AM/logs//crsdc.log
Enter an address or the name of the virtual IP used on node "test01"[test01-vip]
 >

The following information can be collected by running "/sbin/ifconfig -a" on node "test01"
Enter the IP netmask of Virtual IP "10.16.1.113" on node "test01"[255.255.255.0]
 >
Enter the network interface name on which the virtual IP address "10.16.1.113" is active
 >

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

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

Enter the network interface name on which the virtual IP address "10.16.1.114" 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-01-13_10-36-10AM/logs/netdc_check2014-01-13_10-42-38-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-01-13_10-36-10AM/logs/asmcadc_check2014-01-13_10-42-49-AM.log

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


######################### 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:test01,test02
Oracle Home selected for deinstall is: /u01/TEST/grid/11.2.0
Inventory Location where the Oracle home registered is: /u01/TEST/grid/oraInventory
Following RAC listener(s) will be de-configured: LISTENER,LISTENER_SCAN1
ASM was not detected in the Oracle Home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2014-01-13_10-36-10AM/logs/deinstall_deconfig2014-01-13_10-36-58-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2014-01-13_10-36-10AM/logs/deinstall_deconfig2014-01-13_10-36-58-AM.err'

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

ASM de-configuration trace file location: /tmp/deinstall2014-01-13_10-36-10AM/logs/asmcadc_clean2014-01-13_10-43-43-AM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2014-01-13_10-36-10AM/logs/netdc_clean2014-01-13_10-43-43-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


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

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

/tmp/deinstall2014-01-13_10-36-10AM/perl/bin/perl -I/tmp/deinstall2014-01-13_10-36-10AM/perl/lib -I/tmp/deinstall2014-01-13_10-36-10AM/crs/install /tmp/deinstall2014-01-13_10-36-10AM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-01-13_10-36-10AM/response/deinstall_Ora11g_gridinfrahome1.rsp"

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

/tmp/deinstall2014-01-13_10-36-10AM/perl/bin/perl -I/tmp/deinstall2014-01-13_10-36-10AM/perl/lib -I/tmp/deinstall2014-01-13_10-36-10AM/crs/install /tmp/deinstall2014-01-13_10-36-10AM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2014-01-13_10-36-10AM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode

按照上述提示,使用root用户在相应节点节点执行上述命令。执行后按回车继续

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


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

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

Delete directory '/u01/TEST/grid/base' on the local node : Done

Detach Oracle home '/u01/TEST/grid/11.2.0' from the central inventory on the remote nodes 'test02' : Done

Delete directory '/u01/TEST/grid/11.2.0' on the remote nodes 'test02' : Done

Delete directory '/u01/TEST/grid/oraInventory' on the remote nodes 'test02' : Done

Delete directory '/u01/TEST/grid/base' on the remote nodes 'test02' : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END

## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2014-01-13_10-36-10AM' on node 'test01'
Clean install operation removing temporary directory '/tmp/deinstall2014-01-13_10-36-10AM' on node 'test02'

## [END] Oracle install clean ##


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


####################### CLEAN OPERATION SUMMARY #######################
Following RAC listener(s) were de-configured successfully: LISTENER,LISTENER_SCAN1
Oracle Clusterware is stopped and successfully de-configured on node "test02"
Oracle Clusterware is stopped and successfully de-configured on node "test01"
Oracle Clusterware is stopped and de-configured successfully.
Successfully detached Oracle home '/u01/TEST/grid/11.2.0' from the central inventory on the local node.
Successfully deleted directory '/u01/TEST/grid/11.2.0' on the local node.
Successfully deleted directory '/u01/TEST/grid/oraInventory' on the local node.
Successfully deleted directory '/u01/TEST/grid/base' on the local node.
Successfully detached Oracle home '/u01/TEST/grid/11.2.0' from the central inventory on the remote nodes 'test02'.
Successfully deleted directory '/u01/TEST/grid/11.2.0' on the remote nodes 'test02'.
Successfully deleted directory '/u01/TEST/grid/oraInventory' on the remote nodes 'test02'.
Successfully deleted directory '/u01/TEST/grid/base' on the remote nodes 'test02'.
Oracle Universal Installer cleanup was successful.


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

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


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

按照上述提示删除/etc/oraInst.loc和/opt/ORCLfmap。

 


 

 

你可能感兴趣的:(Oracle,database,Oracle,RAC)