数据库
首页 > 数据库> > CentOS7.5上卸载Oracle19c

CentOS7.5上卸载Oracle19c

作者:互联网

1.停库
需要切换到oracle用户
[root@testdb ~]# su - oracle
[oracle@testdb ~]$ sqlplus / as sysdba
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

 

 

2.停监听
[oracle@testdb ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-DEC-2016 14:44:52
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb)(PORT=1521)))
The command completed successfully

 

 

3.停HTTP服务
这一步退出到root用户
[oracle@testdb ~]$ exit
[root@testdb ~]#
[root@testdb ~]# service httpd stop
Stopping httpd: [ OK ]

 

 

4.删除安装目录
[root@testdb ~]# rm -rf /u01/app/oracle/
[root@testdb ~]# rm -rf /u01/app/oraInventory/

 

 

5.删除/usr/bin下文件
[root@testdb ~]# rm -rf /usr/local/bin/dbhome
[root@testdb ~]# rm -rf /usr/local/bin/oraenv
[root@testdb ~]# rm -rf /usr/local/bin/coraenv

 

 

6.删除/etc/oratab和/etc/oraInst.loc
[root@testdb ~]# rm /etc/oratab
[root@testdb ~]# rm /etc/oraInst.loc

 

 

 

 

7.删除oracle用户、用户组(若要重新安装,可以不删除)
[root@testdb ~]# userdel -r oracle

[root@testdb ~]# groupdel oinstall
[root@testdb ~]# groupdel dba

 

 

8.删除启动服务
[root@testdb ~]# chkconfig --del dbora

 

 

到此为止重启后,Linux系统下Oracle数据库已完全删除。

标签:Oracle19c,删除,rf,testdb,卸载,oracle,rm,root,CentOS7.5
来源: https://www.cnblogs.com/yeyuzhuanjia/p/14675912.html