All kind of installations and configurations including de-installation of Oracle RAC or Database, we can perform using either GUI or Silent mode. GUI mode is more easier as it shows all option (with details) step by step but it may not possible for all the cases or may not support on environment. So we can use all oracle provided tools/utility with silent mode which is more faster and you will able to do this by using putty.
To run any tools with silent mode, DBA should have good understand for each parameter.
For any oracle command which runs using OS command like rman or expdp can get help with tool_name -help. So you don’t need to memorize parameters/options for these tools.
To get all parameters/options list run below command:
$ dbca -help $ rman -help
List of available tools in Oracle:
- runInstaller -deinstall -silent # for GI and Database Software
- deinstall -deinstall -silent # for GI and Database Software
- dbca -silent
- asmca -silent
- netca -silent
- dbua -silent
- oifcfg -help # Oracle Interface Configuration Tool
We will discuss in details with each tools:
Oracle RDBMS Software uninstall with Silent Mode: Two Node RAC
[oracle@racdr2 deinstall]$ pwd /u01/app/oracle/product/12.1.0/dbhome_1/deinstall [oracle@racdr2 deinstall]$ ls bootstrap_files.lst deinstall deinstall.xml readme.txt sshUserSetup.sh bootstrap.pl deinstall.pl jlib response utl [oracle@ocmnode1 deinstall]$ ./deinstall
[oracle@ocmnode1 deinstall]$ ./deinstall -help deinstall [ -silent <-checkonly | -paramfile <complete path of input parameter properties file>> ] [ -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 : Display this help message. ]
Once you run deinstall, it will ask below two confirmation and it will show Home (with path) details with list of Nodes which will uninstall.
If Home has multiple databases, provide the db list with comma separator. Then Final confirmation by providing y|yes.
Specify the list of database names that are configured in this Oracle home []: orcl, racdb Do you want to continue (y - yes, n - no)? [n]: y
[oracle@ocmnode1 deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /u001/app/oraInventory/logs/ ############ ORACLE DECONFIG TOOL START ############ ######################### DECONFIG CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /u001/app/oracle/product/12.1.0/dbhome_1 Oracle Home type selected for deinstall is: Oracle Real Application Cluster Database Oracle Base selected for deinstall is: /u01/app/oracle Checking for existence of central inventory location /u001/app/oraInventory Checking for existence of the Oracle Grid Infrastructure home /u001/app/12.1.0/grid The following nodes are part of this cluster: ocmnode1,ocmnode2 Active Remote Nodes are ocmnode2 Checking for sufficient temp space availability on node(s) : 'ocmnode1,ocmnode2' ## [END] Install check configuration ## Network Configuration check config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2020-06-27_01-42-17-AM.log Network Configuration check config END Database Check Configuration START Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2020-06-27_01-42-20-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 []: Database Check Configuration END Oracle Configuration Manager check START OCM check log file location : /u01/app/oraInventory/logs//ocm_check7230.log Oracle Configuration Manager check END ######################### DECONFIG CHECK OPERATION END ######################### ####################### DECONFIG CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /u01/app/12.1.0/grid The following nodes are part of this cluster: ocmnode1,ocmnode2 Active Remote Nodes are ocmnode2 The cluster node(s) on which the Oracle home deinstallation will be performed are:ocmnode1,ocmnode2 Oracle Home selected for deinstall is: /u01/app/oracle/product/12.1.0/dbhome_1 Inventory Location where the Oracle home registered is: /u001/app/oraInventory Checking the config status for CCR ocmnode1 : Oracle Home exists with CCR directory, but CCR is not configured ocmnode2 : 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_deconfig2020-06-27_01-42-01-AM.out' Any error messages from this session will be written to: '/u001/app/oraInventory/logs/deinstall_deconfig2020-06-27_01-42-01-AM.err' ######################## DECONFIG CLEAN OPERATION START ######################## Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2020-06-27_01-43-09-AM.log Network Configuration clean config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2020-06-27_01-43-09-AM.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_clean7230.log Oracle Configuration Manager clean END ######################### DECONFIG CLEAN OPERATION END ######################### ####################### DECONFIG CLEAN OPERATION SUMMARY ####################### 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/deinstall2020-06-27_01-41-40AM/response/deinstall_2020-06-27_01-42-01-AM.rsp Location of logs /u01/app/oraInventory/logs/ ############ ORACLE DEINSTALL TOOL START ############ ####################### DEINSTALL CHECK OPERATION SUMMARY ####################### A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-06-27_01-42-01-AM.out' Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-06-27_01-42-01-AM.err' ######################## DEINSTALL CLEAN OPERATION START ######################## ## [START] Preparing for Deinstall ## Setting LOCAL_NODE to ocmnode1 Setting REMOTE_NODES to ocmnode2 Setting CLUSTER_NODES to ocmnode1,ocmnode2 Setting CRS_HOME to false Setting oracle.installer.invPtrLoc to /tmp/deinstall2020-06-27_01-41-40AM/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 Failed to delete the directory '/u01/app/oracle/product/12.1.0/dbhome_1'. The directory is in use. Delete directory '/u01/app/oracle/product/12.1.0/dbhome_1' on the local node : Failed <<<< The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/12.1.0/grid'. Detach Oracle home '/u01/app/oracle/product/12.1.0/dbhome_1' from the central inventory on the remote nodes 'ocmnode2' : Done Delete directory '/u01/app/oracle/product/12.1.0/dbhome_1' on the remote nodes 'ocmnode2' : Done The Oracle Base directory '/u01/app/oracle' will not be removed on node 'ocmnode2'. The directory is in use by Oracle Home '/u01/app/12.1.0/grid'. Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END ## [START] Oracle install clean ## Clean install operation removing temporary directory '/tmp/deinstall2020-06-27_01-41-40AM' on node 'ocmnode1' Clean install operation removing temporary directory '/tmp/deinstall2020-06-27_01-41-40AM' on node 'ocmnode2' ## [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. Failed to delete directory '/u01/app/oracle/product/12.1.0/dbhome_1' on the local node. Successfully detached Oracle home '/u01/app/oracle/product/12.1.0/dbhome_1' from the central inventory on the remote nodes 'ocmnode2'. Successfully deleted directory '/u01/app/oracle/product/12.1.0/dbhome_1' on the remote nodes 'ocmnode2'. Oracle Universal Installer cleanup was successful. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL TOOL END #############
Oracle Home can be uninstalled by using runInstaller utility also.
[oracle@ocmnode2 bin]$ pwd /u01/app/oracle/product/12.1.0/dbhome_1/oui/bin [oracle@ocmnode2 bin]$ ls addLangs.sh detachHome.sh filesList.properties lsnodes runConfig.sh runInstaller.sh attachHome.sh filesList.bat filesList.sh resource runInstaller runSSHSetup.sh [oracle@ocmnode1 bin]$ ./runInstaller -deinstall -help Checking for required space in /tmp directory ... Space check on /tmp directory passed Bootstrapping the deinstall components Please wait ... Bootstrapping completed deinstall -home <Complete path of Oracle home> [ -silent <-checkonly | -paramfile <complete path of input parameter properties file>> ] [ -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 : Display this help message. ]
Example of de-installation of Oracle Software:
./runInstaller -deinstall -home complete path of Oracle home [-silent] [-checkonly] [-paramfile complete path of input response file] [-params name1=value name2=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]
[oracle@ocmnode1 database]$ ./runInstaller -deinstall -home /u01/app/oracle/product/12.1.0/dbhome_1 Checking for required space in /tmp directory ... Space check on /tmp directory passed Bootstrapping the deinstall components Please wait ... Bootstrapping completed Location of logs /u01/app/oraInventory/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 Real Application Cluster Database 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/12.1.0/grid The following nodes are part of this cluster: ocmnode1,ocmnode2 ####################### DECONFIG CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /u01/app/12.1.0/grid The following nodes are part of this cluster: ocmnode1,ocmnode2 The cluster node(s) on which the Oracle home deinstallation will be performed are:ocmnode1 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 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: '/u01/app/oraInventory/logs/deinstall_deconfig2020-06-27_01-00-18-PM.out' ...... ....
Delete Database with Silent Mode using DBCA
[oracle@ocmnode1 ~]$ dbca -help dbca [-silent | -progressOnly] {<command> <options> } | { [<command> [options] ] -responseFile <response file > } [-continueOnNonFatalErrors <true | false>] <command> : -createDatabase | -configureDatabase | -addInstance | -deleteInstance | -createTemplateFromDB | -createCloneTemplate | -generateScripts | -deleteDatabase | -createPluggableDatabase | -unplugDatabase | -deletePluggableDatabase | -configurePluggableDatabase Enter "dbca -<command> -help" for more option
Example of dropping / deleting ORCL database using dbca with Silent Mode
[oracle@ocmnode1 ~]$ dbca -silent -deleteDatabase -sourceDB orcl Connecting to database 9% complete 14% complete 19% complete 23% complete 28% complete 33% complete 38% complete 47% complete Updating network configuration files 48% complete 52% complete Deleting instances and datafiles 66% complete 80% complete 95% complete 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl1.log" for further details.