在ORACLE 11g R2以前如果想要卸载ORACLE数据库是件非常麻烦的事情,除了卸载CRS和database外还要手工清除很多信息,从11g R2版本开始ORACLE增加了deinstall自动化卸载工具,下面对一个11g R2+ASM的库做卸载的演示。
进入deinstall目录,该目录一般位于ORACLE_HOME目录下,我的路径如下:
[oracle@rac1]$cd /u01/app/oracle/product/11.2/db/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 STARTChecking for existence of the Oracle home location /u01/app/oracle/product/11.2/db
Oracle Home type selected for de-install is: RACDBOracle Base selected for de-install is: /u01/app/oracleChecking for existence of central inventory location /u01/app/oraInventoryChecking for existence of the Oracle Grid Infrastructure home /u01/app/grid/11.2The following nodes are part of this cluster: rac1,rac2Install check configuration END
Network Configuration check config START
Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check4888537112946740838.log
Network Configuration check config END
Database Check Configuration START
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check9019528162378551803.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: rac1The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/racStorage type used by the Database: ASMThe 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 ENDOracle Configuration Manager check STARTOCM check log file location : /u01/app/oraInventory/logs//ocm_check9751.logOracle Configuration Manager check END######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/grid/11.2The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by “,”, eg: node1,node2,…)rac1,rac2Oracle Home selected for de-install is: /u01/app/oracle/product/11.2/dbInventory Location where the Oracle home registered is: /u01/app/oraInventoryThe following databases were selected for de-configuration : racDatabase unique name : racStorage used : ASMWill update the Enterprise Manager configuration for the following database(s): racNo Enterprise Manager ASM targets to updateNo Enterprise Manager listener targets to migrateChecking the config status for CCRrac1 : Oracle Home exists with CCR directory, but CCR is not configuredrac2 : Oracle Home exists with CCR directory, but CCR is not configuredCCR check is finishedDo you want to continue (y – yes, n – no)? [n]: y 此处输入y 回车A log of this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2012-05-07_06-23-47-AM.out’Any error messages from this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2012-05-07_06-23-47-AM.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 Database Control configuration for database rac
Updating Enterprise Manager ASM targets (if any)Updating Enterprise Manager listener targets (if any)Enterprise Manager Configuration Assistant ENDDatabase de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean4515165418037009919.logDatabase Clean Configuration START racThis operation may take few minutes.Database Clean Configuration END racNetwork Configuration clean config START
Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean4980163345251278375.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_clean9751.logOracle Configuration Manager clean ENDOracle Universal Installer clean STARTDetach Oracle home ‘/u01/app/oracle/product/11.2/db’ from the central inventory on the local node : Done
Delete directory ‘/u01/app/oracle/product/11.2/db’ 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/grid/11.2′.
Detach Oracle home ‘/u01/app/oracle/product/11.2/db’ from the central inventory on the remote nodes ‘rac2′ : Done
Delete directory ‘/u01/app/oracle/product/11.2/db’ 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/grid/11.2′.
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 #######################
Updated Enterprise Manager configuration for database racSuccessfully de-configured the following database instances : racCleaning the config for CCRAs CCR is not configured, so skipping the cleaning of CCR configurationCCR clean is finishedSuccessfully detached Oracle home ‘/u01/app/oracle/product/11.2/db’ from the central inventory on the local node.Successfully deleted directory ‘/u01/app/oracle/product/11.2/db’ on the local node.Successfully detached Oracle home ‘/u01/app/oracle/product/11.2/db’ from the central inventory on the remote nodes ‘rac2′.Successfully deleted directory ‘/u01/app/oracle/product/11.2/db’ on the remote nodes ‘rac2′.Oracle Universal Installer cleanup was successful.Oracle install successfully cleaned up the temporary directories.
#################################################################################### ORACLE DEINSTALL & DECONFIG TOOL END #############
删除成功,清除完毕后删除ORACLE软件即可!