一、deinstall使用帮助
1、deinstall命令路径
deinstall路径并不在PATH环境变量里面,我们直接是无法使用的,它在数据库安装目录下面的deinstall目录里面,我这里的路径是/u01/app/oracle/product/11.2.0/dbhome_1/deinstall/deinstall。
2、deinstall使用帮助
$ ./deinstall -help deinstall [ -silent ] [ -checkonly ] [ -local ] [ -paramfile <complete path of input parameter properties file> ] [ -params <name1=value[ name2=value name3=value ...]> ] [ -o <complete path of directory for saving files> ] [ -tmpdir <complete path of temporary directory to use> ] [ -logdir <complete path of log directory to use> ] [ -help : Type -help to get more information on each of the above options. ]
-silent:静默方式;
-checkonly:检查获取参数文件
-paramfile:数据库参数文件
3、checkonly检查
在检查过程中的选项可以直接回车略过,会在最后生成我们需要的参数文件
####################### CHECK OPERATION SUMMARY ####################### Oracle Home selected for deinstall is: /u01/app/oracle/product/11.2.0/dbhome_1 Inventory Location where the Oracle home registered is: /u01/app/oraInventory Following Single Instance listener(s) will be de-configured: LISTENER The following databases were selected for de-configuration : orcl Database unique name : orcl Storage used : FS 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 Oracle Home exists with CCR directory, but CCR is not configured CCR check is finished A log of this session will be written to: '/tmp/deinstall2015-11-09_11-28-59AM/logs/deinstall_deconfig2015-11-09_11-29-05-AM.out' Any error messages from this session will be written to: '/tmp/deinstall2015-11-09_11-28-59AM/logs/deinstall_deconfig2015-11-09_11-29-05-AM.err' ############# ORACLE DEINSTALL & DECONFIG TOOL END #############
“/tmp/deinstall2015-11-09_11-28-59AM/”这个就是我们获取的目录。
二、数据库软件静默卸载
$ ./deinstall -silent -paramfile /tmp/deinstall2015-11-09_11-28-59AM/response/deinstall_OraDb11g_home1.rsp
一下是执行命令之后的过程情况
Checking for required files and bootstrapping ... Please wait ... Using properties file /tmp/deinstall2015-11-09_11-28-59AM/response/deinstall_OraDb11g_home1.rsp Location of logs /tmp/deinstall2015-11-09_11-28-59AM/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################### CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.0/dbhome_1 Oracle Home type selected for deinstall is: Oracle Single Instance Database Oracle Base selected for deinstall is: /u01/app/oracle Checking for existence of central inventory location /u01/app/oraInventory Checking for sufficient temp space availability on node(s) : 'adscan01.comratings.com' ## [END] Install check configuration ## Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2015-11-09_11-28-59AM/logs/netdc_check2015-11-09_11-32-27-AM.log Network Configuration check config END Database Check Configuration START Database de-configuration trace file location: /tmp/deinstall2015-11-09_11-28-59AM/logs/databasedc_check2015-11-09_11-32-27-AM.log ###### For Database 'orcl' ###### Single Instance Database The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/orcl Storage type used by the Database: FS Database file location: /data/oradata/orcl,/u01/app/oracle/fast_recovery_area/orcl Fast recovery area location: /u01/app/oracle/fast_recovery_area/ORCL database spfile location: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora Database Check Configuration END Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2015-11-09_11-28-59AM/logs/emcadc_check2015-11-09_11-32-27-AM.log Checking configuration for database orcl Enterprise Manager Configuration Assistant END Oracle Configuration Manager check START OCM check log file location : /tmp/deinstall2015-11-09_11-28-59AM/logs//ocm_check7092.log Oracle Configuration Manager check END ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Home selected for deinstall is: /u01/app/oracle/product/11.2.0/dbhome_1 Inventory Location where the Oracle home registered is: /u01/app/oraInventory Following Single Instance listener(s) will be de-configured: LISTENER The following databases were selected for de-configuration : orcl Database unique name : orcl Storage used : FS 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 Oracle Home exists with CCR directory, but CCR is not configured CCR check is finished A log of this session will be written to: '/tmp/deinstall2015-11-09_11-28-59AM/logs/deinstall_deconfig2015-11-09_11-32-25-AM.out' Any error messages from this session will be written to: '/tmp/deinstall2015-11-09_11-28-59AM/logs/deinstall_deconfig2015-11-09_11-32-25-AM.err' ######################## CLEAN OPERATION START ######################## Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2015-11-09_11-28-59AM/logs/emcadc_clean2015-11-09_11-32-27-AM.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: /tmp/deinstall2015-11-09_11-28-59AM/logs/databasedc_clean2015-11-09_11-32-29-AM.log Database Clean Configuration START orcl This operation may take few minutes. Database Clean Configuration END orcl Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2015-11-09_11-28-59AM/logs/netdc_clean2015-11-09_11-36-40-AM.log De-configuring Single Instance listener(s): LISTENER De-configuring listener: LISTENER Stopping listener: LISTENER Listener stopped successfully. Deleting listener: LISTENER Listener deleted successfully. Listener 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 Oracle Configuration Manager clean START OCM clean log file location : /tmp/deinstall2015-11-09_11-28-59AM/logs//ocm_clean7092.log Oracle Configuration Manager clean END 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/oracle/product/11.2.0/dbhome_1' from the central inventory on the local node : Done Delete directory '/u01/app/oracle/product/11.2.0/dbhome_1' 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 Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END ## [START] Oracle install clean ## Clean install operation removing temporary directory '/tmp/deinstall2015-11-09_11-32-19AM' on node '116' ## [END] Oracle install clean ## ######################### CLEAN OPERATION END ######################### ####################### CLEAN OPERATION SUMMARY ####################### Successfully de-configured the following database instances : orcl Following Single Instance listener(s) were de-configured successfully: LISTENER 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/dbhome_1' from the central inventory on the local node. Successfully deleted directory '/u01/app/oracle/product/11.2.0/dbhome_1' on the local node. Successfully deleted directory '/u01/app/oraInventory' on the local node. Successfully deleted directory '/u01/app/oracle' on the local node. Oracle Universal Installer cleanup was successful. Run 'rm -rf /etc/oraInst.loc' as root on node(s) '116' at the end of the session. Run 'rm -rf /etc/oratab' as root on node(s) '116' at the end of the session. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END #############
至此,数据库和软件全部卸载完成。