Announcements

Oracle training based on real-time expertise as per industry standards. Upcoming batch details are here.

View batch schedule

Free Oracle mock interview. Register using the link.

Register

#DBAchallenge: submit your questions.

Ask questions
Swipe for more →
Browse by Topic
Latest Posts

    Wednesday, February 16, 2022

    Deinstall 2 node Clusterware Grid Infrastructure Setup

    Deinstall 2 node Clusterware Grid Infrastructure Setup:

    1. Run the deinstall command from node1:

    [oracle@oraclenode1 logs]$ /u01/app/19.0.0.0/grid/deinstall/deinstall
    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /tmp/deinstall2021-03-07_04-37-30AM/logs/

    ############ ORACLE DECONFIG TOOL START ############

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

    Checking for existence of the Oracle home location /u01/app/19.0.0.0/grid
    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/19.0.0.0/grid
    The following nodes are part of this cluster: oraclenode1,oraclenode2
    Active Remote Nodes are oraclenode2
    Checking for sufficient temp space availability on node(s) : 'oraclenode1,oraclenode2'

    ## [END] Install check configuration ##

    Traces log file: /tmp/deinstall2021-03-07_04-37-30AM/logs//crsdc_2021-03-07_04-37-44-AM.log

    Network Configuration check config START

    Network de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/netdc_check2021-03-07_04-37-45AM.log

    Specify all RAC listeners (do not include SCAN listener) that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:

    Network Configuration check config END

    Asm Check Configuration START

    ASM de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/asmcadc_check2021-03-07_04-37-45AM.log

    Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/19.0.0.0/grid.
    ASM Diagnostic Destination : /u01/app/oracle
    ASM Diskgroups : +DATA
    ASM diskstring : /dev/oracleasm/disks/*
    Diskgroups will be dropped
    De-configuring ASM will drop all the diskgroups and their 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]:
    Database Check Configuration START

    Database de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/databasedc_check2021-03-07_04-37-45AM.log

    Oracle Grid Management database was not found in this Grid Infrastructure home

    Database Check Configuration END

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


    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Grid Infrastructure Home is: /u01/app/19.0.0.0/grid
    The following nodes are part of this cluster: oraclenode1,oraclenode2
    Active Remote Nodes are oraclenode2
    The cluster node(s) on which the Oracle home deinstallation will be performed are:oraclenode1,oraclenode2
    Oracle Home selected for deinstall is: /u01/app/19.0.0.0/grid
    Inventory Location where the Oracle home registered is: /u01/app/oraInventory
    Following RAC listener(s) will be de-configured: LISTENER
    ASM instance will be de-configured from this Oracle home
    Oracle Grid Management database was not found in this Grid Infrastructure home
    Do you want to continue (y - yes, n - no)? [n]: y
    A log of this session will be written to: '/tmp/deinstall2021-03-07_04-37-30AM/logs/deinstall_deconfig2021-03-07_04-37-37-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2021-03-07_04-37-30AM/logs/deinstall_deconfig2021-03-07_04-37-37-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/databasedc_clean2021-03-07_04-37-45AM.log
    ASM de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/asmcadc_clean2021-03-07_04-37-45AM.log
    ASM Clean Configuration START
    ASM Clean Configuration END

    Network Configuration clean config START

    Network de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/netdc_clean2021-03-07_04-37-45AM.log

    De-configuring RAC listener(s): LISTENER

    De-configuring listener: LISTENER
        Stopping listener: LISTENER
        Listener stopped successfully.
        Unregistering listener: LISTENER
        Listener unregistered successfully.
    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 "oraclenode2".

    /u01/app/19.0.0.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp"

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

    /u01/app/19.0.0.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp" -lastnode

    Press Enter after you finish running the above commands

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


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


    ####################### DECONFIG CLEAN OPERATION SUMMARY #######################
    There is no Oracle Grid Management database to de-configure in this Grid Infrastructure home
    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 "oraclenode2"
    Oracle Clusterware is stopped and successfully de-configured on node "oraclenode1"
    Oracle Clusterware is stopped and de-configured successfully.
    #######################################################################

    ############# ORACLE DECONFIG TOOL END #############

    Using properties file /tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_2021-03-07_04-37-37-AM.rsp
    Location of logs /tmp/deinstall2021-03-07_04-37-30AM/logs/

    ############ ORACLE DEINSTALL TOOL START ############

    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/tmp/deinstall2021-03-07_04-37-30AM/logs/deinstall_deconfig2021-03-07_04-37-37-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2021-03-07_04-37-30AM/logs/deinstall_deconfig2021-03-07_04-37-37-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oraclenode1
    Setting REMOTE_NODES to oraclenode2
    Setting CLUSTER_NODES to oraclenode1,oraclenode2
    Setting CRS_HOME to true
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-03-07_04-37-30AM/oraInst.loc
    Setting oracle.installer.local to false

    ## [END] Preparing for Deinstall ##

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

    Delete directory '/u01/app/19.0.0.0/grid' 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/19.0.0.0/grid' from the central inventory on the remote nodes 'oraclenode2' : Done

    Delete directory '/u01/app/19.0.0.0/grid' on the remote nodes 'oraclenode2' : Done

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

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

    Oracle Universal Installer cleanup was successful.

    Oracle Universal Installer clean END


    ## [START] Oracle install clean ##

    Clean install operation removing temporary directory '/tmp/deinstall2021-03-07_04-37-30AM' on node 'oraclenode2'

    ## [END] Oracle install clean ##


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


    ####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
    Successfully detached Oracle home '/u01/app/19.0.0.0/grid' from the central inventory on the local node.
    Successfully deleted directory '/u01/app/19.0.0.0/grid' 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/19.0.0.0/grid' from the central inventory on the remote nodes 'oraclenode2'.
    Successfully deleted directory '/u01/app/19.0.0.0/grid' on the remote nodes 'oraclenode2'.
    Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'oraclenode2'.
    Successfully deleted directory '/u01/app/oracle' on the remote nodes 'oraclenode2'.
    Oracle Universal Installer cleanup was successful.


    Run 'rm -r /etc/oraInst.loc' as root on node(s) 'oraclenode1,oraclenode2' at the end of the session.

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


    ############# ORACLE DEINSTALL TOOL END #############


    2. Run the deconfig command on node2:

    [root@oraclenode2 ~]# /u01/app/19.0.0.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp"
    Using configuration parameter file: /tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp
    The log of current session can be found at:
      /tmp/deinstall2021-03-07_04-37-30AM/logs/crsdeconfig_oraclenode2_2021-03-07_04-37-34AM.log
    2021/03/07 04:38:33 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
    2021/03/07 04:40:32 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
    2021/03/07 04:40:33 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
    [root@oraclenode2 ~]# ssh oraclenode1
    root@oraclenode1's password:
    Activate the web console with: systemctl enable --now cockpit.socket

    Last login: Sun Mar  7 04:04:57 2021 from 172.29.0.26
    [root@oraclenode1 ~]# 

    3. Run the deconfig command on node1:

    [root@oraclenode1 ~]# /u01/app/19.0.0.0/grid/crs/install/rootcrs.sh -force  -deconfig -paramfile "/tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp" -lastnode
    Using configuration parameter file: /tmp/deinstall2021-03-07_04-37-30AM/response/deinstall_OraGI19Home1.rsp
    The log of current session can be found at:
      /tmp/deinstall2021-03-07_04-37-30AM/logs/crsdeconfig_oraclenode1_2021-03-07_04-44-04AM.log
    CRS-2673: Attempting to stop 'ora.crsd' on 'oraclenode1'
    CRS-2677: Stop of 'ora.crsd' on 'oraclenode1' succeeded
    ASM de-configuration trace file location: /tmp/deinstall2021-03-07_04-37-30AM/logs/asmcadc_clean2021-03-07_04-46-54AM.log
    ASM Clean Configuration START
    ASM Clean Configuration END

    ASM instance deleted successfully. Check /tmp/deinstall2021-03-07_04-37-30AM/logs/asmcadc_clean2021-03-07_04-46-54AM.log for details.

    2021/03/07 04:48:20 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
    2021/03/07 04:50:08 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
    2021/03/07 04:50:12 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
    2021/03/07 04:50:12 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/app/19.0.0.0/grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.
    [root@oraclenode1 ~]#

    4. Remove the leftover files manually

    [oracle@oraclenode1 logs]$ ps -ef|grep smon
    oracle   2478714 2448867  0 04:52 pts/0    00:00:00 grep --color=auto smon
    [oracle@oraclenode1 logs]$ cd /u01
    [oracle@oraclenode1 u01]$ ll
    total 0
    drwxrwxr-x. 3 oracle oinstall 22 Mar  7 04:51 app
    drwxrwxr-x. 3 oracle oinstall 17 Feb 15 20:23 patches
    [oracle@oraclenode1 u01]$ cd app/
    [oracle@oraclenode1 app]$ ll
    total 0
    drwxrwxr-x. 2 oracle oinstall 6 Mar  7 04:51 19.0.0.0
    [oracle@oraclenode1 app]$ cd 19.0.0.0
    [oracle@oraclenode1 19.0.0.0]$
    [oracle@oraclenode1 19.0.0.0]$ ll
    total 0
    [oracle@oraclenode1 19.0.0.0]$ exit
    logout
    [root@oraclenode1 ~]# rm -r /etc/oraInst.loc
    rm: remove regular file '/etc/oraInst.loc'? y
    [root@oraclenode1 ~]# rm -r /opt/ORCLfmap
    rm: descend into directory '/opt/ORCLfmap'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64/bin'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/bin/fmputl'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/bin/fmputlhp'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/bin'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64/etc'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/etc/filemap.ora'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/etc'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/log'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64'? y
    rm: remove directory '/opt/ORCLfmap'? y
    [root@oraclenode1 ~]# 

    [root@oraclenode2 ~]# ps -ef|grep smon
    root     2316538 2288214  0 04:50 pts/1    00:00:00 grep --color=auto smon
    [root@oraclenode2 ~]# cd /u01
    [root@oraclenode2 u01]# ll
    total 0
    drwxrwxr-x. 3 oracle oinstall 22 Mar  7 04:49 app
    [root@oraclenode2 u01]# cd app/
    [root@oraclenode2 app]# ll
    total 0
    drwxrwxr-x. 2 oracle oinstall 6 Mar  7 04:49 19.0.0.0
    [root@oraclenode2 app]# cd 19.0.0.0
    [root@oraclenode2 19.0.0.0]# ll
    total 0
    [root@oraclenode2 19.0.0.0]# pwd
    /u01/app/19.0.0.0
    [root@oraclenode2 19.0.0.0]# rm -r /etc/oraInst.loc
    rm: remove regular file '/etc/oraInst.loc'? y
    [root@oraclenode2 19.0.0.0]# rm -r /opt/ORCLfmap
    rm: descend into directory '/opt/ORCLfmap'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64/bin'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/bin/fmputl'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/bin/fmputlhp'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/bin'? y
    rm: descend into directory '/opt/ORCLfmap/prot1_64/etc'? y
    rm: remove regular file '/opt/ORCLfmap/prot1_64/etc/filemap.ora'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/etc'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64/log'? y
    rm: remove directory '/opt/ORCLfmap/prot1_64'? y
    rm: remove directory '/opt/ORCLfmap'? y
    [root@oraclenode2 19.0.0.0]#

    Regards,
    Mallik

    No comments:

    Post a Comment

    🌟 Proud to be an Oracle ACE Pro! 🚀

    🌟 Proud to be an Oracle ACE Pro! 🚀 I’m excited to share my official Oracle ACE Profile with the Oracle community. 👨‍💻 Mallikarjun ...