1、停止监听、停止数据录
# lsnrctl stop # sqlplus /as sysdba > shutdown immediate
复制
2、卸载进入deinstall目录执行deinstall
[oracle@cent7 bin]$ cd $ORACLE_HOME/deinstall/ [oracle@cent7 deinstall]$ ls bootstrap.pl deinstall deinstall.pl deinstall.xml jlib readme.txt response sshUserSetup.sh [oracle@cent7 deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2023-12-03_08-51-17PM/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################### CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /u01/data/oracle/product/11.2.0/db_1 Oracle Home type selected for deinstall is: Oracle Single Instance Database Oracle Base selected for deinstall is: /u01/data/oracle Checking for existence of central inventory location /u01/data/inventory Checking for sufficient temp space availability on node(s) : 'cent7' ## [END] Install check configuration ## Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2023-12-03_08-51-17PM/logs/netdc_check2023-12-03_08-55-46-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: /tmp/deinstall2023-12-03_08-51-17PM/logs/databasedc_check2023-12-03_08-58-58-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 [orcl]: ###### For Database 'orcl' ###### Single Instance Database The diagnostic destination location of the database: /u01/data/oracle/diag/rdbms/orcl Storage type used by the Database: FS Database file location: /u01/data/oracle/oradata/orcl,/u01/data/oracle/fast_recovery_area/orcl Fast recovery area location: /u01/data/oracle/fast_recovery_area/ORCL database spfile location: /u01/data/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora The details of database(s) orcl have been discovered automatically. Do you still want to modify the details of orcl database(s)? [n]: Database Check Configuration END Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2023-12-03_08-51-17PM/logs/emcadc_check2023-12-03_09-03-14-PM.log Checking configuration for database orcl Enterprise Manager Configuration Assistant END Oracle Configuration Manager check START OCM check log file location : /tmp/deinstall2023-12-03_08-51-17PM/logs//ocm_check4604.log Oracle Configuration Manager check END ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Home selected for deinstall is: /u01/data/oracle/product/11.2.0/db_1 Inventory Location where the Oracle home registered is: /u01/data/inventory 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 Do you want to continue (y - yes, n - no)? [n]: y A log of this session will be written to: '/tmp/deinstall2023-12-03_08-51-17PM/logs/deinstall_deconfig2023-12-03_08-51-35-PM.out' Any error messages from this session will be written to: '/tmp/deinstall2023-12-03_08-51-17PM/logs/deinstall_deconfig2023-12-03_08-51-35-PM.err' ######################## CLEAN OPERATION START ######################## Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2023-12-03_08-51-17PM/logs/emcadc_clean2023-12-03_09-03-14-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: /tmp/deinstall2023-12-03_08-51-17PM/logs/databasedc_clean2023-12-03_09-09-51-PM.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/deinstall2023-12-03_08-51-17PM/logs/netdc_clean2023-12-03_09-16-04-PM.log De-configuring Single Instance listener(s): LISTENER De-configuring listener: LISTENER Stopping listener: LISTENER Warning: Failed to stop listener. Listener may not be running. Deleting listener: LISTENER Listener deleted successfully. Listener de-configured successfully. De-configuring Naming Methods configuration file... Naming Methods 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/deinstall2023-12-03_08-51-17PM/logs//ocm_clean4604.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/data/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done Delete directory '/u01/data/oracle/product/11.2.0/db_1' on the local node : Done Delete directory '/u01/data/inventory' on the local node : Done Delete directory '/u01/data/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/deinstall2023-12-03_08-51-17PM' on node 'cent7' ## [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/data/oracle/product/11.2.0/db_1' from the central inventory on the local node. Successfully deleted directory '/u01/data/oracle/product/11.2.0/db_1' on the local node. Successfully deleted directory '/u01/data/inventory' on the local node. Successfully deleted directory '/u01/data/oracle' on the local node. Oracle Universal Installer cleanup was successful. Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'cent7' at the end of the session. Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'cent7' at the end of the session. Run 'rm -rf /etc/oratab' as root on node(s) 'cent7' at the end of the session. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END ############# [oracle@cent7 deinstall]$ Display all 1386 possibilities? (y or n)
复制
3、删除oracle目录
rm -rf /u01/data/oracle
复制
4、删除相关目录文件
rm -rf /usr/local/bin/dbhome rm -rf /usr/local/bin/oraenv rm -rf /usr/local/bin/coraenv rm -rf /etc/oratab rm -rf /etc/oraInst.loc
复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【专家有话说第五期】在不同年龄段,DBA应该怎样规划自己的职业发展?
墨天轮编辑部
1329次阅读
2025-03-13 11:40:53
Oracle RAC ASM 磁盘组满了,无法扩容怎么在线处理?
Lucifer三思而后行
804次阅读
2025-03-17 11:33:53
2月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
471次阅读
2025-03-13 14:38:19
Oracle 如何修改 db_unique_name?强迫症福音!
Lucifer三思而后行
368次阅读
2025-03-12 21:27:56
Oracle DataGuard高可用性解决方案详解
孙莹
319次阅读
2025-03-26 23:27:33
Oracle分区和执行计划相关的几个问题
听见风的声音
312次阅读
2025-03-07 08:51:42
切换Oracle归档路径后,不能正常删除原归档路径上的归档文件
dbaking
253次阅读
2025-03-19 14:41:51
风口浪尖!诚通证券扩容采购Oracle 793万...
Roger的数据库专栏
247次阅读
2025-03-24 09:42:53
墨天轮个人数说知识点合集
JiekeXu
245次阅读
2025-04-01 15:56:03
一键装库脚本3分钟极速部署,传统耗时砍掉95%!
IT邦德
244次阅读
2025-03-10 07:58:44