首页 > 数据库 >删除 Oracle 软件和数据库教程

删除 Oracle 软件和数据库教程

时间:2024-03-17 09:59:33浏览次数:21  
标签:03 教程 Mar 14 16 数据库 oracle Oracle root

1.使用 deinstall 工具删除安装的 Oracle 软件的可执行文件和配置文件

[oracle@ocpstudy admin]$ cd $ORACLE_HOME
[oracle@ocpstudy db_1]$ cd  deinstall
[oracle@ocpstudy deinstall]$ ls
bootstrap_files.lst  bootstrap.pl  deinstall  deinstall.pl  deinstall.xml  jlib  readme.txt  response  sshUserSetup.sh  utl
[oracle@ocpstudy deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2024-03-16_09-22-00PM/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/oracle/product/19.3.0/db_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2024-03-16_09-22-00PM/logs/netdc_check2024-03-16_09-22-21PM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2024-03-16_09-22-00PM/logs/databasedc_check2024-03-16_09-22-21PM.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 [orcl,oradb]:    --这里提示现在有两个数据库,确认删除哪个数据库,直接回车表示两个都删除。这个是测试环境,本例直接回车。

###### For Database 'orcl' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/orcl
Storage type used by the Database: FS
Database file location: /u01/app/oracle/oradata/ORCL,/u01/app/oracle/fast_recovery_area/ORCL
Fast recovery area location: /u01/app/oracle/fast_recovery_area/ORCL
database spfile location: /u01/app/oracle/product/19.3.0/db_1/dbs/spfileorcl.ora

###### For Database 'oradb' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/oradb
Storage type used by the Database: FS
Database file location: /u01/app/oracle/oradata/ORADB
Fast recovery area location: Does not exist
database spfile location: /u01/app/oracle/product/19.3.0/db_1/dbs/spfileoradb.ora

The details of database(s) orcl,oradb have been discovered automatically. Do you still want to modify the details of orcl,oradb database(s)? [n]:    --这里询问是否显示详细信息,这里直接回车。

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/19.3.0/db_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The following databases were selected for de-configuration. The databases will be deleted and will not be useful upon de-configuration : orcl,oradb
Database unique name : orcl
Storage used : FS
Database unique name : oradb
Storage used : FS
Do you want to continue (y - yes, n - no)? [n]: y  --这里选择y,表示继续删除。
A log of this session will be written to: '/tmp/deinstall2024-03-16_09-22-00PM/logs/deinstall_deconfig2024-03-16_09-22-16-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2024-03-16_09-22-00PM/logs/deinstall_deconfig2024-03-16_09-22-16-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2024-03-16_09-22-00PM/logs/databasedc_clean2024-03-16_09-22-21PM.log
Database Clean Configuration START orcl
This operation may take few minutes.
Database Clean Configuration END orcl
Database Clean Configuration START oradb
This operation may take few minutes.
Database Clean Configuration END oradb

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2024-03-16_09-22-00PM/logs/netdc_clean2024-03-16_09-22-21PM.log

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


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


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : orcl,oradb
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2024-03-16_09-22-00PM/response/deinstall_2024-03-16_09-22-16-PM.rsp
Location of logs /tmp/deinstall2024-03-16_09-22-00PM/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2024-03-16_09-22-00PM/logs/deinstall_deconfig2024-03-16_09-22-16-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2024-03-16_09-22-00PM/logs/deinstall_deconfig2024-03-16_09-22-16-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to ocpstudy
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2024-03-16_09-22-00PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

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

Delete directory '/u01/app/oracle/product/19.3.0/db_1' on the local node : Done

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

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

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


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


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/oracle/product/19.3.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/19.3.0/db_1' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.


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

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'ocpstudy' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'ocpstudy' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

[oracle@ocpstudy deinstall]$

到这里就卸载完成了,这是进入$ORACLE_HOME路径,会发面里面已经没有文件了。

[oracle@ocpstudy deinstall]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.3.0/db_1
[oracle@ocpstudy deinstall]$ cd /u01/app/
[oracle@ocpstudy app]$ ls
[oracle@ocpstudy app]$

2.删除/etc 目录下的 oraInst.loc、oratab

[root@ocpstudy ~]# cd /etc
[root@ocpstudy etc]# ls ora     --这里按两次tab键
oracle-release  oraInst.loc     oratab
[root@ocpstudy etc]# rm -f oraInst.loc
[root@ocpstudy etc]# rm -f oratab

3.删除/opt 目录下的 ORCLfmap

[root@ocpstudy etc]# cd /opt
[root@ocpstudy opt]# ls
ORCLfmap  rh
[root@ocpstudy opt]# rm -rf ORCLfmap

4.删除/usr/local/bin 下面 Oracle 的所有文件

[root@ocpstudy opt]# cd /usr/local/bin
[root@ocpstudy bin]# ll
total 264
-rwxr-xr-x. 1 root root   6404 Mar 14 19:37 coraenv
-rwxr-xr-x. 1 root root   2445 Mar 14 19:37 dbhome
-rwxr-xr-x. 1 root root   6823 Mar 14 19:37 oraenv
-rwxr-xr-x. 1 root root 248592 Mar 16 18:08 rlwrap
[root@ocpstudy bin]# rm -f  dbhome
[root@ocpstudy bin]# rm -f oraenv

5.删除/tmp 目录下 Oracle 的相关文件

[root@ocpstudy bin]# cd /tmp
[root@ocpstudy tmp]# ll
total 76
-rw-r--r--. 1 root   root      1760 Mar 13 16:51 anaconda.log
-rw-r-----. 1 oracle oinstall 12284 Mar 16 21:39 Cleanup2024-03-16_09-39-02PM.log
drwxr-x---. 3 oracle oinstall  4096 Mar 16 01:07 CVU_19.0.0.0.0_oracle
drwxr-xr-x. 4 oracle oinstall    34 Mar 16 21:39 deinstall2024-03-16_09-22-00PM
drwxr-xr-x. 2 oracle oinstall     6 Mar 16 21:39 hsperfdata_oracle
drwxr-xr-x. 2 root   root        18 Mar 13 15:54 hsperfdata_root
-rw-r--r--. 1 root   root       581 Mar 13 16:48 ifcfg.log
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 15:30 InstallActions2024-03-14_03-30-44PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 15:34 InstallActions2024-03-14_03-34-22PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 15:45 InstallActions2024-03-14_03-45-49PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 15:52 InstallActions2024-03-14_03-52-05PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 15:53 InstallActions2024-03-14_03-53-27PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 16:02 InstallActions2024-03-14_04-02-30PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 16:55 InstallActions2024-03-14_04-55-53PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 17:02 InstallActions2024-03-14_05-02-05PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 17:03 InstallActions2024-03-14_05-03-15PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 17:04 InstallActions2024-03-14_05-04-45PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 17:06 InstallActions2024-03-14_05-06-44PM
drwxr-xr-x. 2 oracle oinstall  4096 Mar 14 17:09 InstallActions2024-03-14_05-09-01PM
-rwx------. 1 root   root       836 Mar 13 16:20 ks-script-1UUfgY
drwxr-xr-x. 2 oracle oinstall     6 Mar 16 21:39 OraInstall2024-03-16_09-39-02PM
-rw-r--r--. 1 root   root         0 Mar 13 16:37 packaging.log
-rw-r--r--. 1 root   root         0 Mar 13 16:37 program.log
-rw-r--r--. 1 root   root         0 Mar 13 16:37 sensitive-info.log
drwx------. 2 root   root        24 Mar 14 17:08 ssh-5P9kvMNCwX0o
drwx------. 2 root   root        25 Mar 13 16:51 ssh-Jb4LB2KmUIrP
drwx------. 2 oracle oinstall    24 Mar 14 17:18 ssh-Nc52D6WDwXkN
-rw-r--r--. 1 root   root         0 Mar 13 16:37 storage.log
drwx------. 3 root   root        17 Mar 14 17:08 systemd-private-c4f4a4ff56b448cf8995dfcc54d58e9f-bolt.service-uWgXrN
drwx------. 3 root   root        17 Mar 14 17:08 systemd-private-c4f4a4ff56b448cf8995dfcc54d58e9f-colord.service-7VTlaR
drwx------. 3 root   root        17 Mar 14 17:07 systemd-private-c4f4a4ff56b448cf8995dfcc54d58e9f-cups.service-fRm9ni
drwx------. 3 root   root        17 Mar 14 17:08 systemd-private-c4f4a4ff56b448cf8995dfcc54d58e9f-fwupd.service-XS03n0
drwx------. 3 root   root        17 Mar 14 17:07 systemd-private-c4f4a4ff56b448cf8995dfcc54d58e9f-rtkit-daemon.service-bBPyEg
drwx------. 2 root   root         6 Mar 13 16:52 tracker-extract-files.0
drwx------. 2 oracle oinstall     6 Mar 14 20:11 tracker-extract-files.54321
drwx------. 2 root   root         6 Mar 14 11:29 vmware-root_887-4013330030
drwx------. 2 root   root         6 Mar 13 16:37 vmware-root_920-2731086625
drwx------. 2 root   root         6 Mar 14 16:53 vmware-root_923-3988752765
drwx------. 2 root   root         6 Mar 14 17:07 vmware-root_939-4022308693
-rw-------. 1 root   root         0 Mar 13 15:49 yum.log

删除该路径下oracle用户 oinstall组的文件。

6.删除 Oracle 安装目录

7.删除 Oracle 用户, dba、oinstall 用户组

# userdel -r oracle
# groupdel  dba
# groupdel  oinstall 

这里的 -r 选项表示在删除用户的同时删除用户的家目录。
注意,在删除用户的同时如果不删除用户的家目录,那么家目录就会变成没有属主和属组的目录,也就是垃圾文件。

标签:03,教程,Mar,14,16,数据库,oracle,Oracle,root
From: https://blog.csdn.net/Ruishine/article/details/136770253

相关文章

  • 【数据库】数据库介绍
    文章目录一、数据库介绍二、SQL分类一、数据库介绍什么是数据库存储数据用文件就可以了,为什么还要弄个数据库?文件保存数据有以下几个缺点:文件的安全性问题文件不利于数据查询和管理文件不利于存储海量数据文件在程序中控制不方便数据库存储介质:磁盘内存为......
  • opensips数据库配置及数据表简介
    操作系统:CentOS7.6_x64opensips版本:2.4.9MySQL版本:5.7.38一、添加mysql支持1、安装mysql依赖库安装命令如下:wgethttps://repo.mysql.com/mysql57-community-release-el7.rpmrpm-ivhmysql57-community-release-el7.rpmrpm--importhttps://repo.mysql.com/RPM-GPG-......
  • 【原创】三十分钟实时数据可视化网站前后端教程 Scrapy + Django + React 保姆级教程
    这个本来是想做视频的,所以是以讲稿的形式写的。最后没做视频,但是觉得这篇文还是值得记录一下。真的要多记录,不然一些不常用的东西即使做过几个月又有点陌生了。文章目录爬虫SCRAPYxpath后端DJANGO前端REACTHello大家好这里是小鱼,最近我做了一个前后端分离的实......
  • 插入数据库遇到中文无插入的问题 Error 1366 (HY000): Incorrect string value: ‘\x
    项目场景:beego登录注册过程中将信息写入到MYSQL数据库中问题描述字段写入过程中数据出现无法写入的情况,出现报错:Error1366(HY000):Incorrectstringvalue:‘\xE7\x94\xB7’forcolumn‘sex’atrow1原因分析:根据控制台收到的打印信息我发现数据正确从前......
  • SQL-Labs靶场“32-33”关通关教程
    君衍.一、32关GET单引号闭合宽字节注入1、源码分析2、宽字节注入原理3、联合查询注入4、updatexml报错注入5、floor报错注入二、33关GET单引号addslashes逃逸注入1、源码分析2、联合查询注入3、updatexml报错注入4、floor报错注入SQL-Labs靶场通关教程:SQL注入......
  • Qt教程 — 3.4 深入了解Qt 控件:Input Widgets部件(3)
    目录1 InputWidgets简介2如何使用InputWidgets部件2.1Dial组件-模拟车速表2.2 QScrollBar组件-创建水平和垂直滚动条2.3 QSlider组件-创建水平和垂直滑动条 2.4 QKeySequenceEdit组件-捕获键盘快捷键InputWidgets部件部件较多,将分为三篇文章介绍文章1(Qt......
  • 宝宝起名网,姓名分析打分php源码带数据库带火车头免登录发布模块
    宝宝起名网源码/取名网/姓名分析/名字打分/算命测算文章系统演示地址:https://s17.ryzlk.com/手机端地址:https://m.s17.ryzlk.com/起名说明:起名内容来源数据库,通过客户提交的姓名,出生年月日表单,计算出用户的五行缺旺,然后从数据库中调用五行相符的姓名提供给客户。......
  • 数据库引论:2.SQL简介
    SQL(StructuredQueryLanguage,结构化查询语言)2.1SQL查询语言概览SQL语言包含数据定义语言(Data-DefinitionLanguage,DDL)。SQLDDL提供定义关系模式、删除关系以及修改关系模式的命令。数据操纵语言(Data-ManipulationLanguage,DML)。SQLDML提供从数据库中查询信......
  • 赛灵思Vivado 2020.2安装教程超详细,同样适用vivado2018版本(注意本教程仅供学习使用)
    注意本教程仅供学习使用一、软件安装二、软件免验证方式一、软件安装安装包可以到正点原子资料网站下载(达芬奇Pro开发板资料)Vivado官方建议关闭杀毒软件后安装(红色字体)关闭防火墙和杀毒软件点击next,这一页保持默认或者根据额外需要勾选同意左上角选择安装路......
  • Linux环境下Minio的安装部署与启动教程(完整版)
    1、概述MinIO是一个开源、分布式的对象存储系统,专为云原生环境设计。它提供了一个基于标准的AmazonS3兼容接口,使得开发者可以使用熟悉的API在私有云或边缘环境中部署和管理大规模非结构化数据,如图片、视频、日志文件等。MinIO的核心特点包括:高性能:采用Golang编写,设计时充分考......