Chinaunix首页 | 论坛 | 博客
  • 博客访问: 239128
  • 博文数量: 59
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 592
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-01 12:51
个人简介

你们都是我的客户,所以,我对你们是透明的

文章分类

全部博文(59)

文章存档

2016年(29)

2015年(30)

分类: Oracle

2015-11-19 13:05:39

1、oracle软件卸载
[oracle@rac1 deinstall]$ cd
[oracle@rac1 ~]$ cd $ORACLE_HOME/deinstall
[oracle@rac1 deinstall]$ ls
bootstrap.pl  deinstall  deinstall.pl  deinstall.xml  jlib  readme.txt  response  sshUserSetup.sh
[oracle@rac1 deinstall]$ ./deinstall

一些摘要
Specify the list of database names that are configured in this Oracle home [orcl]:
###### For Database 'orcl' ######
RAC Database
The nodes on which this database has instances: [rac1, rac2]
The instance names: [orcl1, orcl2]
The local instance name on node: orcl1
The diagnostic destination location of the database: /oracle/app/oracle/diag/rdbms/orcl
Storage type used by the Database: ASM
The details of database(s) orcl have been discovered automatically. Do you still want to modify the details of orcl database(s)? [n]:
Database Check Configuration END
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: /oracle/app/oraInventory/logs/emcadc_check2015-11-18_09-05-44-PM.log
Checking configuration for database orcl
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /oracle/app/oraInventory/logs//ocm_check3911.log
Oracle Configuration Manager check END
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /oracle/app/11.2.0/grid
The cluster node(s) on which the Oracle home deinstallation will be performed are:rac1,rac2
Oracle Home selected for deinstall is: /oracle/app/oracle/product/11.2.0/db_1
Inventory Location where the Oracle home registered is: /oracle/app/oraInventory
The following databases were selected for de-configuration : orcl
Database unique name : orcl
Storage used : ASM
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
rac1 : Oracle Home exists with CCR directory, but CCR is not configured
rac2 : 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
## [START] Oracle install clean ##
Clean install operation removing temporary directory '/tmp/deinstall2015-11-18_09-03-06PM' on node 'rac1'
Clean install operation removing temporary directory '/tmp/deinstall2015-11-18_09-03-06PM' on node 'rac2'
## [END] Oracle install clean ##
######################### CLEAN OPERATION END #########################
####################### CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : orcl
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 '/oracle/app/oracle/product/11.2.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/oracle/app/oracle/product/11.2.0/db_1' on the local node.
Failed to delete directory '/oracle/app/oracle' on the local node.
Successfully detached Oracle home '/oracle/app/oracle/product/11.2.0/db_1' from the central inventory on the remote nodes 'rac2'.
Successfully deleted directory '/oracle/app/oracle/product/11.2.0/db_1' on the remote nodes 'rac2'.
Failed to delete directory '/oracle/app/oracle' on the remote nodes 'rac2'.
Oracle Universal Installer cleanup completed with errors.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
[oracle@rac1 deinstall]$

2、grid卸载
[grid@rac1 ~]$ cd $ORACLE_HOME/deinstall
[grid@rac1 deinstall]$ ls
bootstrap.pl  deinstall  deinstall.pl  deinstall.xml  jlib  readme.txt  response  sshUserSetup.sh
[grid@rac1 deinstall]$ ./deinstall
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: /oracle/app/11.2.0/grid
The cluster node(s) on which the Oracle home deinstallation will be performed are:rac1,rac2
Oracle Home selected for deinstall is: /oracle/app/11.2.0/grid
Inventory Location where the Oracle home registered is: /oracle/app/oraInventory
Following RAC listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y


(用root用户执行下面command)
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 "rac2".

/tmp/deinstall2015-11-18_09-13-17PM/perl/bin/perl -I/tmp/deinstall2015-11-18_09-13-17PM/perl/lib -I/tmp/deinstall2015-11-18_09-13-17PM/crs/install /tmp/deinstall2015-11-18_09-13-17PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp"

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

/tmp/deinstall2015-11-18_09-13-17PM/perl/bin/perl -I/tmp/deinstall2015-11-18_09-13-17PM/perl/lib -I/tmp/deinstall2015-11-18_09-13-17PM/crs/install /tmp/deinstall2015-11-18_09-13-17PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode

Press Enter after you finish running the above commands

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

a、2节点
[root@rac2 ~]# /tmp/deinstall2015-11-18_09-13-17PM/perl/bin/perl -I/tmp/deinstall2015-11-18_09-13-17PM/perl/lib -I/tmp/deinstall2015-11-18_09-13-17PM/crs/install /tmp/deinstall2015-11-18_09-13-17PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp"
Using configuration parameter file: /tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp
Network exists: 1/192.168.56.0/255.255.255.0/, type static
VIP exists: /rac1-vip/192.168.56.111/192.168.56.0/255.255.255.0/, hosting node rac1
VIP exists: /rac2-vip/192.168.56.112/192.168.56.0/255.255.255.0/, hosting node rac2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac2'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac2' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'rac2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'rac2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac2'
CRS-2677: Stop of 'ora.ctssd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac2'
CRS-2677: Stop of 'ora.drivers.acfs' on 'rac2' succeeded
CRS-2677: Stop of 'ora.cssd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac2'
CRS-2677: Stop of 'ora.crf' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac2'
CRS-2677: Stop of 'ora.gipcd' on 'rac2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac2'
CRS-2677: Stop of 'ora.gpnpd' on 'rac2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[root@rac2 ~]#
[root@rac2 ~]#

b、1节点
[root@rac1 /]# /tmp/deinstall2015-11-18_09-13-17PM/perl/bin/perl -I/tmp/deinstall2015-11-18_09-13-17PM/perl/lib -I/tmp/deinstall2015-11-18_09-13-17PM/crs/install /tmp/deinstall2015-11-18_09-13-17PM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode
Using configuration parameter file: /tmp/deinstall2015-11-18_09-13-17PM/response/deinstall_Ora11g_gridinfrahome1.rsp
Network exists: 1/192.168.56.0/255.255.255.0/, type static
VIP exists: /rac1-vip/192.168.56.111/192.168.56.0/255.255.255.0/, hosting node rac1
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac1'
CRS-2677: Stop of 'ora.registry.acfs' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-4611: Successful deletion of voting disk +CRS.
ASM de-configuration trace file location: /tmp/deinstall2015-11-18_09-13-17PM/logs/asmcadc_clean2015-11-18_09-25-44-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /tmp/deinstall2015-11-18_09-13-17PM/logs/asmcadc_clean2015-11-18_09-25-44-PM.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crf' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.crf' on 'rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node
[root@rac1 /]#


continue
继续回到刚才卸载grid的地方,敲回车


####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following RAC listener(s) were de-configured successfully: LISTENER
Oracle Clusterware is stopped and successfully de-configured on node "rac1"
Oracle Clusterware is stopped and successfully de-configured on node "rac2"
Oracle Clusterware is stopped and de-configured successfully.
Successfully detached Oracle home '/oracle/app/11.2.0/grid' from the central inventory on the local node.
Successfully deleted directory '/oracle/app/11.2.0/grid' on the local node.
Successfully deleted directory '/oracle/app/oraInventory' on the local node.
Successfully deleted directory '/oracle/app/grid_base' on the local node.
Successfully detached Oracle home '/oracle/app/11.2.0/grid' from the central inventory on the remote nodes 'rac2'.
Successfully deleted directory '/oracle/app/11.2.0/grid' on the remote nodes 'rac2'.
Successfully deleted directory '/oracle/app/oraInventory' on the remote nodes 'rac2'.
Successfully deleted directory '/oracle/app/grid_base' on the remote nodes 'rac2'.
Oracle Universal Installer cleanup was successful.


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

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


############# ORACLE DEINSTALL & DECONFIG TOOL END #############
[grid@rac1 deinstall]$

在指定节点执行上面的command
[root@rac1 /]# rm -rf /etc/oraInst.loc
[root@rac1 /]# rm -rf /opt/ORCLfmap
[root@rac1 /]# rm -rf /etc/oratab

[root@rac2 ~]# rm -rf /etc/oraInst.loc
[root@rac2 ~]# rm -rf /opt/ORCLfmap

最后看到rac1下还有oraInventory这个文件夹
[root@rac1 /]# cd /oracle/app/
[root@rac1 app]# ls
11.2.0  oracle  oraInventory
[root@rac1 app]# rm -rf oraInventory/

好了,可以继续重装了,直接从grid开始。
如果不用重装rac,就把oracle和gird用户删除,还有/oracle目录
阅读(2093) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~