记得原来在10g RAC的时候,清除RAC还要删除很多东西。有一次某客户的10RAC装不起来,OUI安装数据库时,一直卡在83%,后来查了才发现是没有清除/etc/oratab文件中的信息,导致一直在读取之前的几个实例的信息,由于其他相关的信息,如inventory中的信息已经删除,所以一直卡在83%。
在11g中,发现RAC可以已经很方便的删除。这里记录一下。
一、删除DB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
以oracle用户进DB的$ORACLE_HOME/deinstall目录: [oracle@rac1 deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /u01/app/oraInventory/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################## CHECK OPERATION START ######################## Install check configuration START Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.0/db_1 Oracle Home type selected for de-install is: RACDB Oracle Base selected for de-install 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/11.2.0/grid The following nodes are part of this cluster: rac1,rac2 Install check configuration END Network Configuration check config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check5918110311258732273.log Network Configuration check config END Database Check Configuration START Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check5363661270402408504.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 [RAC] ###### For Database 'RAC' ###### RAC Database The nodes on which this database has instances: [rac1, rac2] The instance names: [RAC1, RAC2] The local instance name on node: RAC1 The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/rac Storage type used by the Database: ASM The details of database(s) RAC have been discovered automatically. Do you still want to modify the details of RAC database(s)? [n]: Database Check Configuration END Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /u01/app/oraInventory/logs/emcadc_check.log Checking configuration for database RAC Enterprise Manager Configuration Assistant END Oracle Configuration Manager check START OCM check log file location : /u01/app/oraInventory/logs//ocm_check527.log Oracle Configuration Manager check END ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)rac1,rac2 Oracle Home selected for de-install is: /u01/app/oracle/product/11.2.0/db_1 Inventory Location where the Oracle home registered is: /u01/app/oraInventory The following databases were selected for de-configuration : RAC Database unique name : RAC 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 A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2013-04-17_09-54-09-PM.out' Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2013-04-17_09-54-09-PM.err' ######################## CLEAN OPERATION START ######################## Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /u01/app/oraInventory/logs/emcadc_clean.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/app/oraInventory/logs/databasedc_clean6823318628303945948.log Database Clean Configuration START RAC This operation may take few minutes. Database Clean Configuration END RAC Network Configuration clean config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean7837686391516099968.log 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/app/oraInventory/logs//ocm_clean527.log Oracle Configuration Manager clean END Oracle Universal Installer clean START Detach Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done Delete directory '/u01/app/oracle/product/11.2.0/db_1' on the local node : Done The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/11.2.0/grid'. Detach Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the remote nodes 'rac2' : Done Delete directory '/u01/app/oracle/product/11.2.0/db_1' on the remote nodes 'rac2' : Done The Oracle Base directory '/u01/app/oracle' will not be removed on node 'rac2'. The directory is in use by Oracle Home '/u01/app/11.2.0/grid'. Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END Oracle install clean START Clean install operation removing temporary directory '/tmp/install' on node 'rac1' Clean install operation removing temporary directory '/tmp/install' on node 'rac2' Oracle install clean END ######################### CLEAN OPERATION END ######################### ####################### CLEAN OPERATION SUMMARY ####################### Successfully de-configured the following database instances : RAC 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/app/oracle/product/11.2.0/db_1' from the central inventory on the local node. Successfully deleted directory '/u01/app/oracle/product/11.2.0/db_1' on the local node. Successfully detached Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the remote nodes 'rac2'. Successfully deleted directory '/u01/app/oracle/product/11.2.0/db_1' on the remote nodes 'rac2'. Oracle Universal Installer cleanup was successful. Oracle install successfully cleaned up the temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END ############# |
二、删除cluster
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
[oracle@rac1 deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2013-04-17_11-02-41-PM/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################## CHECK OPERATION START ######################## Install check configuration START Checking for existence of the Oracle home location /u01/app/11.2.0/grid Oracle Home type selected for de-install is: CRS Oracle Base selected for de-install 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/11.2.0/grid The following nodes are part of this cluster: rac1,rac2 Install check configuration END Traces log file: /tmp/deinstall2013-04-17_11-02-41-PM/logs//crsdc.log Enter an address or the name of the virtual IP used on node "rac1"[rac1-vip] > The following information can be collected by running ifconfig -a on node "rac1" Enter the IP netmask of Virtual IP "192.168.190.111" on node "rac1"[255.255.255.0] > Enter the network interface name on which the virtual IP address "192.168.190.111" is active > Enter an address or the name of the virtual IP used on node "rac2"[rac2-vip] > The following information can be collected by running ifconfig -a on node "rac2" Enter the IP netmask of Virtual IP "192.168.190.112" on node "rac2"[255.255.255.0] > Enter the network interface name on which the virtual IP address "192.168.190.112" is active > Enter an address or the name of the virtual IP[] > Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2013-04-17_11-02-41-PM/logs/netdc_check8051611905687411918.log Specify all RAC listeners that are to be de-configured [LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1]: Network Configuration check config END Asm Check Configuration START ASM de-configuration trace file location: /tmp/deinstall2013-04-17_11-02-41-PM/logs/asmcadc_check8300983266881693834.log ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/11.2.0/grid. ASM Diagnostic Destination : /u01/app/oracle ASM Diskgroups : +DATA 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]: ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)rac1,rac2 Oracle Home selected for de-install 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,LISTENER_SCAN3,LISTENER_SCAN2,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/deinstall2013-04-17_11-02-41-PM/logs/deinstall_deconfig2013-04-17_11-06-30-PM.out' Any error messages from this session will be written to: '/tmp/deinstall2013-04-17_11-02-41-PM/logs/deinstall_deconfig2013-04-17_11-06-30-PM.err' ######################## CLEAN OPERATION START ######################## ASM de-configuration trace file location: /tmp/deinstall2013-04-17_11-02-41-PM/logs/asmcadc_clean881651366887715059.log ASM Clean Configuration START ASM Clean Configuration END Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2013-04-17_11-02-41-PM/logs/netdc_clean2736845693367133281.log De-configuring RAC listener(s): LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1 De-configuring listener: LISTENER Stopping listener: LISTENER Listener stopped successfully. Listener de-configured successfully. De-configuring listener: LISTENER_SCAN3 Stopping listener: LISTENER_SCAN3 Listener stopped successfully. Listener de-configured successfully. De-configuring listener: LISTENER_SCAN2 Stopping listener: LISTENER_SCAN2 Listener stopped successfully. Listener de-configured successfully. De-configuring listener: LISTENER_SCAN1 Stopping listener: LISTENER_SCAN1 Listener stopped 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 ----------------------------------------> Run the following command as the root user or the administrator on node "rac2". /tmp/deinstall2013-04-17_11-02-41-PM/perl/bin/perl -I/tmp/deinstall2013-04-17_11-02-41-PM/perl/lib -I/tmp/deinstall2013-04-17_11-02-41-PM/crs/install /tmp/deinstall2013-04-17_11-02-41-PM/crs/install/rootcrs.pl -force -delete -paramfile /tmp/deinstall2013-04-17_11-02-41-PM/response/deinstall_Ora11g_gridinfrahome1.rsp Run the following command as the root user or the administrator on node "rac1". /tmp/deinstall2013-04-17_11-02-41-PM/perl/bin/perl -I/tmp/deinstall2013-04-17_11-02-41-PM/perl/lib -I/tmp/deinstall2013-04-17_11-02-41-PM/crs/install /tmp/deinstall2013-04-17_11-02-41-PM/crs/install/rootcrs.pl -force -delete -paramfile /tmp/deinstall2013-04-17_11-02-41-PM/response/deinstall_Ora11g_gridinfrahome1.rsp -lastnode Press Enter after you finish running the above commands <---------------------------------------- ----------------------------------------> Press Enter after you finish running the above commands <---------------------------------------- ----------------------------------------> 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 The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty. Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'rac2' : Done Delete directory '/u01/app/11.2.0/grid' on the remote nodes 'rac2' : Done Delete directory '/u01/app/oraInventory' on the remote nodes 'rac2' : Done The Oracle Base directory '/u01/app/oracle' will not be removed on node 'rac2'. The directory is not empty. Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END Oracle install clean START Clean install operation removing temporary directory '/tmp/install' on node 'rac1' Clean install operation removing temporary directory '/tmp/install' on node 'rac2' Oracle install clean END ######################### 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,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1 Oracle Clusterware was already stopped and de-configured on node "rac2" Oracle Clusterware was already stopped and de-configured on node "rac1" 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 detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'rac2'. Successfully deleted directory '/u01/app/11.2.0/grid' on the remote nodes 'rac2'. Successfully deleted directory '/u01/app/oraInventory' 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. Oracle install successfully cleaned up the temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END ############# [oracle@rac1 deinstall]$ |