반응형
포스팅에 들어가며
오라클은 Unix나 Linux의 경우에는 rm 명령으로 오라클 엔진을 삭제해도 무방하다. 하지만 NT. 즉, Windows 서버의 경우에는 폴더를 삭제했다고 오라클이 삭제되는 것이 아니다. 왜냐하면 환경변수의 Path라던지 Registry가 남기 때문이다. 따라서 정확하게 지우려면 오라클 엔진에서 기본적으로 제공되는 deinstall을 이용해야 깔끔하게 삭제할 수 있다.
삭제의 경우에는 엔진의 경로를 이동한다거나 엔진의 설치가 잘못되었을 경우(라이선스 위배)와 같이 기존 엔진을 삭제하고 재설치를 할 경우에 필요하다. deinstall은 11g 기준이라 굉장히 간단해졌다.
Step 1. deinstall
C:\Users\Administrator>cd \oracle\product\11g\deinstall // ORACLE HOME 경로로 이동
C:\oracle\product\11g\deinstall>deinstall.bat // deinstall 수행
Checking for required files and bootstrapping ...
Please wait ...
1 file(s) copied.
1 file(s) copied.
Location of logs C:\Users\Administrator\logs\
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################### CHECK OPERATION START #########################
## [START] Install check configuration ##
Checking for existence of the Oracle home location C:\oracle\product\11g
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: C:\oracle
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\Administrator\logs\netdc_check2017-10-23_06-34-04-PM.log
Specify all Single Instance listeners that are to be de-configured [LISTENER]: // Listener 명을 묻는 것이다. 기본 설정을 했을 경우 Enter. 아닌 경우 리스너명을 적어주면 된다.
Network Configuration check config END
Database Check Configuration START
Database de-configuration trace file location: C:\Users\Administrator\logs\databasedc_check2017-10-23_06-34-17-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 [DWHR]: // 엔진에 인식된 DB name을 묻는 것. 맞다면 역시 Enter
###### For Database 'DWHR' ######
Single Instance Database
The diagnostic destination location of the database: C:\ORACLE\diag\rdbms\dwhr
Storage type used by the Database: FS
Database file location: C:\ORADATA\DWHR
Fast recovery area location: Does not exist
database spfile location: C:\ORACLE\PRODUCT\11G\DATABASE\SPFILEDWHR.ORA
The details of database(s) DWHR have been discovered automatically. Do you still
want to modify the details of DWHR database(s)? [n]: // DB가 발견됨을 알림. 수정할게 있느냐고 묻는 것이기 때문에 우리는 n. 즉, 그대로 Enter
Database Check Configuration END
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: C:\Users\Administrator\logs\emcadc_check2017-10-23_06-35-38-PM.log
Checking configuration for database DWHR
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : C:\Users\Administrator\logs\\ocm_check870.log
Oracle Configuration Manager check END
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: C:\oracle\product\11g
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 : DWHR
Database unique name : DWHR
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\Administrator\logs\deinstall_deconfig2017-10-23_06-34-02-PM.out'
Any error messages from this session will be written to: 'C:\Users\Administrator\logs\deinstall_deconfig2017-10-23_06-34-02-PM.err'
######################## CLEAN OPERATION START ########################
Enterprise Manager Configuration Assistant START
EMCA de-configuration trace file location: C:\Users\Administrator\logs\emcadc_clean2017-10-23_06-35-38-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\Administrator\logs\databasedc_clean2017-10-23_06-35-59-PM.log
Database Clean Configuration START DWHR
This operation may take few minutes.
Database Clean Configuration END DWHR
Network Configuration clean config START
Network de-configuration trace file location: C:\Users\Administrator\logs\netdc_clean2017-10-23_06-36-42-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\Administrator\logs\\ocm_clean870.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\product\11g' from the central inventory on the local node : Done
Delete directory 'C:\oracle\product\11g' on the local node : Done
Delete directory 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle - OraDb11g_home1' on the local node : Done
Removing oracle home 'C:\oracle\product\11g' 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
Failed to delete the directory 'C:\oracle\product'. The directory is in use.
Failed to delete the directory 'C:\oracle'. The directory is not empty.
Delete directory 'C:\oracle' on the local node : Failed <<<< // directory에 하위 폴더가 사용중이라 삭제못하여 난 에러. 무시해도 무방
Oracle Universal Installer cleanup completed with errors.
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 : DWHR
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\product\11g' from the central inventory on the local node.
Successfully deleted directory 'C:\oracle\product\11g' 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\product\11g' 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.
Failed to delete directory 'C:\oracle' on the local node.
Oracle Universal Installer cleanup completed with errors.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############
1 dir(s) moved.
1 dir(s) moved.
C:\Users\ADMINI~1\AppData\Local\Temp\1>
위와 같이 하면 삭제는 완료된다. 위에 굵은글로 표시된 것을 보면 알겠지만 registry와 path, directory 등 모두 함께 삭제를 해준다.
Step 2. 삭제된 항목 확인
환경변수에 ORACLE_HOME/bin이 제거 됨을 알 수 있다.
ORACLE 관련 REGISTRY가 모두 제거됐음을 알 수 있다.
ORACLE DIRECTORY 역시 삭제됐음을 알 수 있다.
포스팅을 마치며
NT ORACLE의 경우 따로 REQUIREMENT가 필요없고 설치도 셋팅만 잘되어있다면 가장 손쉽게 설치가 가능하다. 하지만 삭제는 다른 OS에 비해 어려운게 사실이다. 한번 꼬이기 시작하면 차라리 OS를 재설치하고 ORACLE 설치를 진행하는게 빠를 수도 있다. 따라서 NT ORACLE은 꼬이지 않도록 DEINSTALL도 정확하게 진행해야할 필요성이 있다.
제 블로그의 내용이 도움이 되셨나요?
▼▼▼▼▼▼▼▼▼▼▼
여러분의 공감과 댓글이 아잇티에게 큰 힘이됩니다 :)
반응형
'Run? Learn! > Oracle - Admin' 카테고리의 다른 글
Oracle 11g Engine install on Windows(NT) (0) | 2017.10.26 |
---|---|
Linux용 Oracle hotbackup Script (1) | 2017.10.25 |
11gR2 Installation On Linux(Requirements) (0) | 2017.10.18 |
Linux에서 ODBC를 통한 Connetion from Oracle to MSSQL 2부 (1) | 2017.10.12 |
Linux에서 ODBC를 통한 Connetion from Oracle to MSSQL 1부 (0) | 2017.10.11 |