删除grid软件的正确方式(单节点)

环境:

OS:Centos 7

DB:11.2.0.1 Grid infrastructure for a Standalone Server

 HAS不需要停掉,删除过程会自动停掉,该方法删除后,asm磁盘里的内容同时会清理掉.

 

[grid@localhost deinstall]su - grid
[grid@localhost deinstall]cd $ORACLE_HOME/deinstall
[grid@localhost deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2020-11-20_02-19-16AM/logs/

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


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


Checking for existence of the Oracle home location /u01/grid/grid_home
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u01/grid/grid_base
Checking for existence of central inventory location /u01/grid/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/grid/grid_home
Checking for sufficient temp space availability on node(s) : 'localhost.localdomain'

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2020-11-20_02-19-16AM/logs//crsdc.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2020-11-20_02-19-16AM/logs/netdc_check2020-11-20_02-19-33-AM.log

Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2020-11-20_02-19-16AM/logs/asmcadc_check2020-11-20_02-19-39-AM.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/grid/grid_home.
ASM Diagnostic Destination : /u01/grid/grid_base
ASM Diskgroups : +DATA,+DATA1
ASM diskstring : /dev/asm*
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]: y
Specify the ASM Diagnostic Destination [/u01/grid/grid_base]:
Specify the diskstring [/dev/asm*]:
Specify the diskgroups that are managed by this ASM instance [+DATA,+DATA1]:

De-configuring ASM will drop the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups y|n [y]:


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


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/grid/grid_home
The cluster node(s) on which the Oracle home deinstallation will be performed are:null
Oracle Home selected for deinstall is: /u01/grid/grid_home
Inventory Location where the Oracle home registered is: /u01/grid/oraInventory
Following Oracle Restart enabled 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
A log of this session will be written to: '/tmp/deinstall2020-11-20_02-19-16AM/logs/deinstall_deconfig2020-11-20_02-19-30-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2020-11-20_02-19-16AM/logs/deinstall_deconfig2020-11-20_02-19-30-AM.err'

######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2020-11-20_02-19-16AM/logs/asmcadc_clean2020-11-20_02-20-42-AM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2020-11-20_02-19-16AM/logs/netdc_clean2020-11-20_02-20-47-AM.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped successfully.
    Unregistering listener: LISTENER
    Listener unregistered successfully.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.

De-configuring Listener configuration file...
Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


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

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

/tmp/deinstall2020-11-20_02-19-16AM/perl/bin/perl -I/tmp/deinstall2020-11-20_02-19-16AM/perl/lib -I/tmp/deinstall2020-11-20_02-19-16AM/crs/install /tmp/deinstall2020-11-20_02-19-16AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2020-11-20_02-19-16AM/response/deinstall_Ora11g_gridinfrahome1.rsp"

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

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

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

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

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2020-11-20_02-19-16AM' on node 'localhost'

## [END] Oracle install clean ##


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


####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart was already stopped and de-configured on node "localhost"
Oracle Restart is stopped and de-configured successfully.
Successfully detached Oracle home '/u01/grid/grid_home' from the central inventory on the local node.
Successfully deleted directory '/u01/grid/grid_home' on the local node.
Successfully deleted directory '/u01/grid/oraInventory' on the local node.
Successfully deleted directory '/u01/grid/grid_base' on the local node.
Oracle Universal Installer cleanup was successful.


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

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


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


安装提示执行如下命令:

[root@localhost ~]# /tmp/deinstall2020-11-20_02-19-16AM/perl/bin/perl -I/tmp/deinstall2020-11-20_02-19-16AM/perl/lib -I/tmp/deinstall2020-11-20_02-19-16AM/crs/install /tmp/deinstall2020-11-20_02-19-16AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2020-11-20_02-19-16AM/response/deinstall_Ora11g_gridinfrahome1.rsp"
Using configuration parameter file: /tmp/deinstall2020-11-20_02-19-16AM/response/deinstall_Ora11g_gridinfrahome1.rsp
PRKO-2573 : ONS daemon is already stopped.
CRS-2673: Attempting to stop 'ora.cssd' on 'localhost'
CRS-2677: Stop of 'ora.cssd' on 'localhost' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'localhost'
CRS-2673: Attempting to stop 'ora.evmd' on 'localhost'
CRS-2677: Stop of 'ora.evmd' on 'localhost' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'localhost' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle Restart stack

 


rm -rf /etc/oraInst.loc
rm -rf /opt/ORCLfmap
rm -rf /etc/oratab

 

按需要格式化ASM磁盘头,如:
[root@db01] dd if=/dev/zero count=10 bs=512 of=/dev/sde1

 

以上操作完成后

grid用户的oracle_home和oracle_base目录也一起删除掉了,重新安装需要重新创建.

-- The End --

原文地址:https://www.cnblogs.com/hxlasky/p/14011148.html