Jeden ze způsobů, jak lze odinstalovat ORACLE_HOME nebo jen některé adresáře, je použití utility deinstall.
Utilita je dostupná přímo v daném ORACLE_HOME, co máte nainstalovaný na serveru nebo si ji můžete stáhnout z OTN.
Věnujte pozornost souboru deinstall\utl\orabase_cleanup.lst, kde se definují adresáře, které se mají smazat. Pár informací je i v DOC.
Moje konfigurace:
cfgtoollogs
checkpoints
flash_recovery_area
fast_recovery_area
diag
recovery_area
Pak stačí jen utilitu spustit a odklikat potřebné.
D:\Source\deinstall>deinstall.bat -home c:\Oracle\app\11.2.0.3\db_home1
Location of logs C:\Users\oracle\logs\
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################### CHECK OPERATION START ######################### ## [START] Install check configuration ##
Checking for existence of the Oracle home location c:\Oracle\app\11.2.0.3\db_home1 Oracle Home type selected for deinstall is: Oracle Single Instance Database Oracle Base selected for deinstall is: c:\Oracle\app Checking for existence of central inventory location C:\Program Files\Oracle\Inventory
## [END] Install check configuration ##
## [START] Checking Windows and .NET products configuration ##
The following Windows and .NET products will be deconfigured from the Oracle home : asp.net,ode.net,odp.net,ntoledb,oramts
## [END] Checking Windows and .NET products configuration ##
Network Configuration check config START
Network de-configuration trace file location: C:\Users\oracle\logs\netdc_check2014-06-06_05-44-00-PM.log
Specify all Single Instance listeners that are to be de-configured [LISTENER]:
Network Configuration check config END
Database Check Configuration START
Database de-configuration trace file location: C:\Users\oracle\logs\databasedc_check2014-06-06_05-44-10-PM.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 [ORCL11R2]:
###### For Database 'ORCL11R2' ######
Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [1]: Specify the diagnostic destination location of the database [c:\Oracle\app\diag\rdbms\orcl11R2]: Specify the storage type used by the Database ASM|FS []: FS
Specify the list of directories if any database files exist on a shared file system. If 'ORCL11R2' subdirectory is found, then it w will be deleted. Alternatively, you can specify list of database files with full path [ ]: d:\dba\pom <--- to jsem si pro jistotu udělal pomocný adresář, nevěděl jsem, co všechno mě smaže
Specify the fast recovery area location, if it is configured on the file system. If 'ORCL11R2' subdirectory is found, then it will : d:\dba\pom
Specify the database spfile location [ ]: c:\Oracle\app\11.2.0.3\db_home1\database
Database Check Configuration END
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: C:\Users\oracle\logs\emcadc_check2014-06-06_05-50-44-PM.log
Checking configuration for database ORCL11R2 Enterprise Manager Configuration Assistant END Oracle Configuration Manager check START OCM check log file location : C:\Users\oracle\logs\\ocm_check_2014-06-06_05-50-44-PM.log Oracle Configuration Manager check END
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY ####################### Oracle Home selected for deinstall is: c:\Oracle\app\11.2.0.3\db_home1 Inventory Location where the Oracle home registered is: C:\Program Files\Oracle\Inventory The following Windows and .NET products will be deconfigured from the Oracle home : asp.net,ode.net,odp.net,ntoledb,oramts Following Single Instance listener(s) will be de-configured: LISTENER The following databases were selected for de-configuration : ORCL11R2 Database unique name : ORCL11R2 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 Do you want to continue (y - yes, n - no)? [n]: y A log of this session will be written to: 'C:\Users\oracle\logs\deinstall_deconfig2014-06-06_05-43-58-PM.out' Any error messages from this session will be written to: 'C:\Users\oracle\logs\deinstall_deconfig2014-06-06_05-43-58-PM.err'
######################## CLEAN OPERATION START ########################
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: C:\Users\oracle\logs\emcadc_clean2014-06-06_05-50-44-PM.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: C:\Users\oracle\logs\databasedc_clean2014-06-06_05-50-48-PM.log Database Clean Configuration START ORCL11R2 This operation may take few minutes. Database Clean Configuration END ORCL11R2
Network Configuration clean config START
Network de-configuration trace file location: C:\Users\oracle\logs\netdc_clean2014-06-06_05-50-57-PM.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 Listener configuration file... Listener configuration file de-configured successfully.
De-configuring Naming Methods configuration file... Naming Methods configuration file 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 : C:\Users\oracle\logs\\ocm_clean_2014-06-06_05-50-44-PM.log Oracle Configuration Manager clean END ## [START] Removing Windows and .NET products configuration ##
## [END] Removing Windows and .NET products configuration ## Setting the force flag to false Setting the force flag to cleanup the Oracle Base Oracle Universal Installer clean START
Removing service 'OracleOraDb11g_home1ClrAgent' on the local node : Done
Detach Oracle home 'c:\Oracle\app\11.2.0.3\db_home1' from the central inventory on the local node : Done
Failed to delete the file 'c:\Oracle\app\11.2.0.3\db_home1\BIN\oci.dll.o.1'. The file is in use. Failed to delete the directory 'c:\Oracle\app\11.2.0.3\db_home1\BIN'. The directory is not empty. Failed to delete the directory 'c:\Oracle\app\11.2.0.3\db_home1'. The directory is not empty. Delete directory 'c:\Oracle\app\11.2.0.3\db_home1' on the local node : Failed <<<<
Delete directory 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle - OraDb11g_home1' on the local node : Done
Removing oracle home 'c:\Oracle\app\11.2.0.3\db_home1' from PATH variable on the local node : Done
Delete directory 'C:\Program Files\Oracle\Inventory' on the local node : Done
Delete directory 'C:\Program Files\Oracle' on the local node : Done
Delete Registry key 'HKEY_LOCAL_MACHINE\Software\Oracle\inst_loc' on the local node : Done
Delete Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\ODP.NET' on the local node : Done
Delete Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\OracleMTSRecoveryService' on the local node : Done
Delete Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\_DosLinks' on the local node : Done
Delete Registry key 'HKEY_LOCAL_MACHINE\System\\CurrentControlSet\\Services\\Oracle11' on the local node : Done
The Oracle Base directory 'c:\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 ##
## [END] Oracle install clean ##
######################### CLEAN OPERATION END #########################
####################### CLEAN OPERATION SUMMARY ####################### Successfully de-configured the following database instances : ORCL11R2 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 Removed asp.net configuration Removed ode.net configuration Removed odp.net configuration Removed ntoledb configuration Removed oramts configuration Successfully removed service 'OracleOraDb11g_home1ClrAgent' on the local node. Successfully detached Oracle home 'c:\Oracle\app\11.2.0.3\db_home1' from the central inventory on the local node. Failed to delete directory 'c:\Oracle\app\11.2.0.3\db_home1' on the local node. Successfully deleted directory 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle - OraDb11g_home1' on the local node. Successfully removed oracle home 'c:\Oracle\app\11.2.0.3\db_home1' from PATH variable on the local node. Successfully deleted directory 'C:\Program Files\Oracle\Inventory' on the local node. Successfully deleted directory 'C:\Program Files\Oracle' on the local node. Successfully deleted Registry key 'HKEY_LOCAL_MACHINE\Software\Oracle\inst_loc' on the local node. Successfully deleted Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\ODP.NET' on the local node. Successfully deleted Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\OracleMTSRecoveryService' on the local node. Successfully deleted Registry key 'HKEY_LOCAL_MACHINE\Software\\Oracle\\_DosLinks' on the local node. Successfully deleted Registry key 'HKEY_LOCAL_MACHINE\System\\CurrentControlSet\\Services\\Oracle11' on the local node. Oracle Universal Installer cleanup was successful.
Oracle deinstall tool successfully cleaned up temporary directories. #######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
D:\Source\deinstall>