1. 程式人生 > >Oracle 12.1.0.2 卸載數據庫

Oracle 12.1.0.2 卸載數據庫

ssi his listener sep directory odi ani ted pre

本案例數據庫(12.1.0.2)安裝在文件系統上,因此只需要deinstall 數據庫即可。 前提: (1)關閉數據庫,shutdown immediate; (2)關閉監聽,lsnrctl stop (3)最後,deinstall數據庫 [root@roidb01 database]# su - oracle <roidb01:cdb1:/home/oracle>$cd $ORACLE_HOME/ <roidb01:cdb1:/u01/app/oracle/product/12.1.0/dbhome_1>$cd deinstall/ <roidb01:cdb1:/u01/app/oracle/product/12.1.0/dbhome_1/deinstall>$./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2018-08-13_09-28-09AM/logs/ ############ ORACLE DECONFIG TOOL START ############ ######################### DECONFIG CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /u01/app/oracle/product/12.1.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 ## [END] Install check configuration ## Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2018-08-13_09-28-09AM/logs/netdc_check2018-08-13_09-28-37-AM.log Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]: Network Configuration check config END Database Check Configuration START Database de-configuration trace file location: /tmp/deinstall2018-08-13_09-28-09AM/logs/databasedc_check2018-08-13_09-30-18-AM.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 [cdb1,cdb2]: ###### For Database ‘cdb1‘ ###### Single Instance Database The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/cdb1 Storage type used by the Database: FS Database file location: /u01/app/oracle/oradata/cdb1 Fast recovery area location: Does not exist database spfile location: /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfilecdb1.ora ###### For Database ‘cdb2‘ ###### Single Instance Database The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/cdb2 Storage type used by the Database: FS Database file location: /u01/app/oracle/oradata/cdb2 Fast recovery area location: Does not exist database spfile location: /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfilecdb2.ora The details of database(s) cdb1,cdb2 have been discovered automatically. Do you still want to modify the details of cdb1,cdb2 database(s)? [n]: Database Check Configuration END Oracle Configuration Manager check START OCM check log file location : /tmp/deinstall2018-08-13_09-28-09AM/logs//ocm_check1059.log Oracle Configuration Manager check END ######################### DECONFIG CHECK OPERATION END ######################### ####################### DECONFIG CHECK OPERATION SUMMARY ####################### Oracle Home selected for deinstall is: /u01/app/oracle/product/12.1.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 : cdb1,cdb2 Database unique name : cdb1 Storage used : FS Database unique name : cdb2 Storage used : FS Checking the config status for CCR 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: ‘/tmp/deinstall2018-08-13_09-28-09AM/logs/deinstall_deconfig2018-08-13_09-28-35-AM.out‘ Any error messages from this session will be written to: ‘/tmp/deinstall2018-08-13_09-28-09AM/logs/deinstall_deconfig2018-08-13_09-28-35-AM.err‘ ######################## DECONFIG CLEAN OPERATION START ######################## Database de-configuration trace file location: /tmp/deinstall2018-08-13_09-28-09AM/logs/databasedc_clean2018-08-13_09-31-53-AM.log Database Clean Configuration START cdb1 This operation may take few minutes. Database Clean Configuration END cdb1 Database Clean Configuration START cdb2 This operation may take few minutes. Database Clean Configuration END cdb2 Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2018-08-13_09-28-09AM/logs/netdc_clean2018-08-13_09-34-41-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 Local Net Service Names configuration file... Local Net Service Names 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 Oracle Configuration Manager clean START OCM clean log file location : /tmp/deinstall2018-08-13_09-28-09AM/logs//ocm_clean1059.log Oracle Configuration Manager clean END ######################### DECONFIG CLEAN OPERATION END ######################### ####################### DECONFIG CLEAN OPERATION SUMMARY ####################### Successfully de-configured the following database instances : cdb1,cdb2 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 ################################################################### ############# ORACLE DECONFIG TOOL END ############# Using properties file /tmp/deinstall2018-08-13_09-28-09AM/response/deinstall_2018-08-13_09-28-35-AM.rsp Location of logs /tmp/deinstall2018-08-13_09-28-09AM/logs/ ############ ORACLE DEINSTALL TOOL START ############ ####################### DEINSTALL CHECK OPERATION SUMMARY ####################### A log of this session will be written to: ‘/tmp/deinstall2018-08-13_09-28-09AM/logs/deinstall_deconfig2018-08-13_09-28-35-AM.out‘ Any error messages from this session will be written to: ‘/tmp/deinstall2018-08-13_09-28-09AM/logs/deinstall_deconfig2018-08-13_09-28-35-AM.err‘ ######################## DEINSTALL CLEAN OPERATION START ######################## ## [START] Preparing for Deinstall ## Setting LOCAL_NODE to orcl Setting CRS_HOME to false Setting oracle.installer.invPtrLoc to /tmp/deinstall2018-08-13_09-28-09AM/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/oracle/product/12.1.0/dbhome_1‘ from the central inventory on the local node : Done Delete directory ‘/u01/app/oracle/product/12.1.0/dbhome_1‘ 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. Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END ## [START] Oracle install clean ## Clean install operation removing temporary directory ‘/tmp/deinstall2018-08-13_09-28-09AM‘ on node ‘orcl‘ ## [END] Oracle install clean ## ######################### DEINSTALL CLEAN OPERATION END ######################### ####################### DEINSTALL CLEAN OPERATION SUMMARY ####################### Successfully detached Oracle home ‘/u01/app/oracle/product/12.1.0/dbhome_1‘ from the central inventory on the local node. Successfully deleted directory ‘/u01/app/oracle/product/12.1.0/dbhome_1‘ on the local node. Successfully deleted directory ‘/u01/app/oraInventory‘ on the local node. Oracle Universal Installer cleanup was successful. Run ‘rm -r /etc/oraInst.loc‘ as root on node(s) ‘orcl‘ at the end of the session. Run ‘rm -r /etc/oratab‘ as root on node(s) ‘orcl‘ at the end of the session. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL TOOL END ############# <roidb01:cdb1:/u01/app/oracle/product/12.1.0/dbhome_1/deinstall>$exit logout [root@roidb01 database]# rm -r /etc/oraInst.loc rm: remove regular file ‘/etc/oraInst.loc’? y [root@roidb01 database]# rm -r /etc/oratab rm: remove regular file ‘/etc/oratab’? y <roidb01:cdb1:/home/oracle>$env |grep ORA ORACLE_UNQNAME=orcl ORA_NLS11=/u01/app/oracle/product/12.1.0/dbhome_1/nls/data ORACLE_SID=cdb1 ORACLE_BASE=/u01/app/oracle ORACLE_TERM=xterm PS1=<roidb01:$ORACLE_SID:$PWD>$ ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 <roidb01:cdb1:/home/oracle>$cd $ORACLE_BASE <roidb01:cdb1:/u01/app/oracle>$ls admin audit <roidb01:cdb1:/u01/app/oracle>$rm -rf * <roidb01:cdb1:/u01/app/oracle>$

Oracle 12.1.0.2 卸載數據庫