Linux平台下卸载ORACLE

简介:

实验环境:操作系统版本:Red Hat Enterprise Linux Server release 5.5 (Tikanga),
数据库版本 :Oracle Database 10g Enterprise Edition Release 10.2.0.1.0。
卸载ORACLE 10g的过程,在不同平台或不同版本数据可能有些步骤略有不同,具体操作的时候请结合实际情况酌情处理。

1. 首先做好备份工作(如果有需要的话,如果你想重新完全安装,可以忽略这个步骤)。用 oracle 用户登录。 最好先做一些备份工作。例如备份数据库文件等。

2. 使用SQL*PLUS停止数据库

[oracle@wgods ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 27 09:35:23 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

3. 停止Listener服务
[oracle@wgods ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 27-MAR-2013 09:37:21

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
The command completed successfully

4. 停止HTTP服务
[oracle@wgods ~]$ service httpd stop

5. 删除$ORACLE_BASE目录下的所有文件

[oracle@wgods ~]echoORACLE_BASE
/database/oracle
[oracle@wgods ~]$ ls -lrt /database/oracle
total 40
drwxrwx--- 3 oracle oinstall 4096 Dec 14 11:28 product
drwxrwx--- 6 oracle oinstall 4096 Dec 14 11:36 oraInventory
drwxr-x--- 3 oracle oinstall 4096 Dec 14 11:36 oradata
drwxr-x--- 3 oracle oinstall 4096 Dec 14 11:36 admin
drwxr-x--- 3 oracle oinstall 4096 Dec 14 11:37 flash_recovery_area
[oracle@wgods ~]rmrfORACLE_BASE/*


6.切换到root账号

[oracle@wgods ~]$ su - root

7.删除/etc/oraInst.loc /etc/oratab文件

[root@wgods ~]# rm /etc/oraInst.loc /etc/oratab
rm: remove regular file `/etc/oraInst.loc'? y
rm: remove regular file `/etc/oratab'? y

注意网上有些文章有删除/usr/bin 下的一些文件,例如 rm /usr/bin/dbhome、rm /usr/bin/oraenv、rm /usr/bin/coraenv。这个在ORACLE 10g下是没有的

8.删除oracle用户(若要重新安装,可以不删除)
[root@wgods ~]# userdel –r oracle

9.删除用户组(若要重新安装,可以不删除)
[root@wgods ~]# groupdel oinstall
[root@wgods ~]# groupdel dba

10.将启动服务删除
[root@OracleTest /root]# chkconfig --del dbora

操作完后,你的ORALCE数据库已经完全、彻底的删除了。

 

目录
打赏
0
0
0
0
35
分享
相关文章
Oracle Linux 8.10 编译安装sysbench
Oracle Linux 8.10 编译安装sysbench
71 34
Oracle linux 8 二进制安装 MySQL 8.4企业版
Oracle linux 8 二进制安装 MySQL 8.4企业版
29 1
Android调试终极指南:ADB安装+多设备连接+ANR日志抓取全流程解析,覆盖环境变量配置/多设备调试/ANR日志分析全流程,附Win/Mac/Linux三平台解决方案
ADB(Android Debug Bridge)是安卓开发中的重要工具,用于连接电脑与安卓设备,实现文件传输、应用管理、日志抓取等功能。本文介绍了 ADB 的基本概念、安装配置及常用命令。包括:1) 基本命令如 `adb version` 和 `adb devices`;2) 权限操作如 `adb root` 和 `adb shell`;3) APK 操作如安装、卸载应用;4) 文件传输如 `adb push` 和 `adb pull`;5) 日志记录如 `adb logcat`;6) 系统信息获取如屏幕截图和录屏。通过这些功能,用户可高效调试和管理安卓设备。
linux8安装oracle 11g遇到的问题记录
Oracle 11g在Linux 8上安装时会遇到link编译环节的问题。官方建议忽略安装中的链接错误,安装完成后应用DBPSU 11.2.0.4.240716补丁及一次性补丁33991024,再重新编译二进制文件,并配置监听器和数据库。但因11g已退出服务期,这些补丁需付费获取。网上信息显示22年1月的PSU补丁也可解决问题,找到该补丁后按常规方式打补丁即可。如有需求或疑问可咨询我。
135 20
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
139 10
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Linux平台Oracle开机自启动设置
【11月更文挑战第8天】在 Linux 平台设置 Oracle 开机自启动有多种方法,本文以 CentOS 为例,介绍了两种常见方法:使用 `rc.local` 文件(较简单但不推荐用于生产环境)和使用 `systemd` 服务(推荐)。具体步骤包括编写启动脚本、赋予执行权限、配置 `rc.local` 或创建 `systemd` 服务单元文件,并设置开机自启动。通过 `systemd` 方式可以更好地与系统启动过程集成,更规范和可靠。
425 2
下一篇
oss创建bucket
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等