linux 卸载Oracle12c
1.关闭Oracle数据库SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL>2.停止Listener进程[oracle@oracle ~]$ lsnrctl stopLSNRCTL for Linux: Version 12.1...
·
1.关闭Oracle数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
2.停止Listener进程
[oracle@oracle ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-JUN-2019 14:38:20
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.47.129)(PORT=1521)))
The command completed successfully
[oracle@oracle ~]$
3.使用deinstall工具删除安装的Oracle软件的可执行文件和配置文件
[oracle@oracle deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2019-06-25_02-41-08PM/logs/
############ ORACLE DECONFIG TOOL START ############
######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##
Checking for existence of the Oracle home location /usr/oracle/product
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /usr/oracle
Checking for existence of central inventory location /usr/oraInventory
## [END] Install check configuration ##
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2019-06-25_02-41-08PM/logs/netdc_check2019-06-25_02-42-56-PM.log
Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:
4.删除/etc目录下的oraInst.loc、oratab,删除/opt目录下的ORCLfmap
[root@oracle etc]# rm -rf oraInst.loc
[root@oracle etc]# rm -rf oratab
[root@oracle etc]#
[root@oracle etc]# rm -rf oraInst.loc
[root@oracle etc]# rm -rf oratab
[root@oracle etc]#
drwxr-xr-x. 3 root root 25 Jun 21 15:40 oracle
drwxr-xr-x. 3 root root 22 Jun 21 17:18 ORCLfmap
drwxr-xr-x. 2 root root 6 Feb 17 2017 rh
[root@oracle opt]# rm -rf ORCLfmap/
[root@oracle opt]# ll
total 0
drwxr-xr-x. 3 root root 25 Jun 21 15:40 oracle
drwxr-xr-x. 2 root root 6 Feb 17 2017 rh
[root@oracle opt]#
5.删除/usr/local/bin下面Oracle的所有文件
[root@oracle bin]# ll
total 20
-rwxr-xr-x. 1 oracle root 6583 Jun 21 17:18 coraenv
-rwxr-xr-x. 1 oracle root 2445 Jun 21 17:18 dbhome
-rwxr-xr-x. 1 oracle root 7012 Jun 21 17:18 oraenv
[root@oracle bin]# rm -rf coraenv
[root@oracle bin]# rm -rf dbhome
[root@oracle bin]# rm -rf oraenv
[root@oracle bin]#
6.删除/tmp目录下Oracle的相关文件
[root@oracle tmp]# rm -rf CVU_12.1.0.2.0_oracle
[root@oracle tmp]# rm -rf hsperfdata_oracle
[root@oracle tmp]# rm -rf deinstall2019-06-25_02-41-08PM
7. 删除Oracle安装目录
[root@oracle usr]# rm -rf oracle
[root@oracle usr]# rm -rf oraInventory
8. 删除Oracle用户级dba、oinstall用户组
[root@oracle ~]# userdel oracle
[root@oracle ~]# groupdel dba
groupdel: gr[root@oracle ~]# userdel oracle
[root@oracle ~]# groupdel dba
groupdel: group 'dba' does not exist
[root@oracle ~]# groupdel oinstalloup 'dba' does not exist
[root@oracle ~]# groupdel oinstall
至此重启机器 Oracle12c 卸载完成 !
更多推荐
已为社区贡献1条内容
所有评论(0)