CentOS卸载Oracle 11gR2(x64)

Stella981
• 阅读 842

环境

OS: CentOS 7.4; hosts: L134; IP: 192.168.1.134  
Oracle安装文件目录:/opt/oracle_install  
ORACLE_BASE:/data/app/oracle  
ORACLE_HOME: /data/app/oracle/product/11.2.0/db_1  
oraInventory: /data/app/oraInventory  
Oracle数据目录:/data/app/oradata/  

方法1:使用oracle自带的deinstall卸载

[oracle@L134 ~]$ cd $ORACLE_HOME/deinstall
[oracle@L134 /data/app/oracle/product/11.2.0/db_1/deinstall]$ ./deinstall 

然后根据提示一步一步进行操作即可。最后一步是确认操作,选择y,回车。

Do you want to continue (y - yes, n - no)? [n]: y

最后还要需要以root身份删除/etc/oraInst.loc这个文件。 我觉得方法2删除更方便更彻底。

方法2:手动删除相关文件和目录

  1. 关闭实例

    sqlplus / as sysdba SQL> shutdown immediate

  2. 关闭listener

    lsnrctl stop

  3. 删除安装目录

    su - rm -rf /data/app/oracle/ /data/app/oraInventory/ /data/app/oradata/

  4. 以root权限删除/usr/bin下的相关文件。下周

    cd /usr/local/bin/ rm -f dbhome oraenv coraenv

  5. 删除/etc/oratab

    rm -f /etc/oratab

  6. 删除

    rm -f /etc/oraInst.loc

  7. 删除oracle用户和用户组(如有必要)

    userdel -r oracle groupdel oinstall groupdel dba groupdel oper

  8. 删除启动服务

    chkconfig --del oracle

扩展

oracle自带的deinstall卸载的提示和日志信息

[oracle@L134 /data/oracle/11g2/deinstall]$ ./deinstall 
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2018-03-08_08-53-24-AM/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################## CHECK OPERATION START ########################
Install check configuration START


Checking for existence of the Oracle home location /data/app/oracle/product/11.2.0/db_1
Oracle Home type selected for de-install is: SIDB
Oracle Base selected for de-install is: /data/app/oracle
Checking for existence of central inventory location /data/app/oraInventory

Install check configuration END


Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/netdc_check1471463216126639250.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/deinstall2018-03-08_08-53-24-AM/logs/databasedc_check5326208000777792237.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 [orclyz]: 

###### For Database 'orclyz' ######

Single Instance Database
The diagnostic destination location of the database: /data/app/oracle/diag/rdbms/orclyz
Storage type used by the Database: FS
Database file location: /data/app/oracle/oradata/orclyz,/data/app/oracle/flash_recovery_area/orclyz
Flash recovery area location: /data/app/oracle/flash_recovery_area/ORCLYZ
database spfile location: /data/app/oracle/product/11.2.0/db_1/dbs/spfileorclyz.ora

The details of database(s) orclyz have been discovered automatically. Do you still want to modify the details of orclyz database(s)? [n]: 

Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/emcadc_check.log 

Checking configuration for database orclyz
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /tmp/deinstall2018-03-08_08-53-24-AM/logs//ocm_check5456.log
Oracle Configuration Manager check END

######################### CHECK OPERATION END #########################


####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for de-install is: /data/app/oracle/product/11.2.0/db_1
Inventory Location where the Oracle home registered is: /data/app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration : orclyz
Database unique name : orclyz
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/deinstall2018-03-08_08-53-24-AM/logs/deinstall_deconfig2018-03-08_08-53-33-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2018-03-08_08-53-24-AM/logs/deinstall_deconfig2018-03-08_08-53-33-AM.err'

######################## CLEAN OPERATION START ########################

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/emcadc_clean.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/deinstall2018-03-08_08-53-24-AM/logs/databasedc_clean1081110075195191916.log
Database Clean Configuration START orclyz
This operation may take few minutes.
Database Clean Configuration END orclyz

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/netdc_clean1072295666521765217.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 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/deinstall2018-03-08_08-53-24-AM/logs//ocm_clean5456.log
Oracle Configuration Manager clean END
Oracle Universal Installer clean START

Detach Oracle home '/data/app/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done

Delete directory '/data/app/oracle/product/11.2.0/db_1' on the local node : Done

Delete directory '/data/app/oraInventory' on the local node : Done

Delete directory '/data/app/oracle' on the local node : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


Oracle install clean START

Clean install operation removing temporary directory '/tmp/install' on node 'PostalDataDG'

Oracle install clean END


######################### CLEAN OPERATION END #########################


####################### CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : orclyz
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 '/data/app/oracle/product/11.2.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/data/app/oracle/product/11.2.0/db_1' on the local node.
Successfully deleted directory '/data/app/oraInventory' on the local node.
Successfully deleted directory '/data/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'PostalDataDG' at the end of the session.

Oracle install successfully cleaned up the temporary directories.
#######################################################################


############# ORACLE DEINSTALL & DECONFIG TOOL END #############



点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Wesley13 Wesley13
3年前
Java获得今日零时零分零秒的时间(Date型)
publicDatezeroTime()throwsParseException{    DatetimenewDate();    SimpleDateFormatsimpnewSimpleDateFormat("yyyyMMdd00:00:00");    SimpleDateFormatsimp2newS
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
10个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这