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 ~]$ echo $ORACLE_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 ~]$ rm -rf $ORACLE_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数据库已经完全、彻底的删除了。

 

相关文章
|
3月前
|
负载均衡 Oracle 关系型数据库
Linux启动多个Oracle实例
Linux启动多个Oracle实例
37 0
|
27天前
|
Shell Linux C语言
【Shell 命令集合 系统设置 】⭐Linux 卸载已加载的内核模块rmmod命令 使用指南
【Shell 命令集合 系统设置 】⭐Linux 卸载已加载的内核模块rmmod命令 使用指南
29 1
|
4月前
|
Oracle 关系型数据库 Linux
windows 11 hyper-v中oracle linux虚拟机中添加硬盘
在windows 11自带的hyper-v虚拟机中添加硬盘,并分区
65 6
|
4月前
|
IDE Linux 开发工具
Linux添加硬盘并进行分区、格式化、挂载及卸载
Linux添加硬盘并进行分区、格式化、挂载及卸载
126 0
|
4月前
|
监控 关系型数据库 机器人
小白带你学习linux的监控平台zabbix
小白带你学习linux的监控平台zabbix
132 0
|
3月前
|
Linux 网络安全
linux服务器中如何卸载宝塔
linux服务器中如何卸载宝塔
662 0
|
27天前
|
Linux Shell 文件存储
【Shell 命令集合 系统设置 】Linux 加载和卸载内核模块 modprobe命令 使用指南
【Shell 命令集合 系统设置 】Linux 加载和卸载内核模块 modprobe命令 使用指南
36 1
|
18天前
|
Linux Docker 容器
Linux彻底卸载Docker包括运行拉取的镜像
Linux彻底卸载Docker包括运行拉取的镜像
21 1
|
22天前
|
Java Linux Shell
linux卸载jdk
linux卸载jdk
34 0
|
2月前
|
Ubuntu Linux
百度搜索:蓝易云【Linux平台下构建TigerVNC项目教程】
至此,你已经成功在Linux平台下构建并安装了TigerVNC项目。现在你可以启动VNC服务器并通过VNC客户端连接到远程桌面。请注意,上述步骤仅适用于一般情况,具体的构建步骤可能会因为不同的系统环境和版本而有所不同。在实际操作中,可能还需要根据实际情况进行一些调整。
33 1