Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to delete Oracle database software with deinstall and command line

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to use deinstall and command line to delete Oracle database software. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

1. Deinstall tools 1.1. Tool introduction

Deinstall tool is a database software uninstall tool provided by oracle. You can refer to the official documentation path: Installing and Upgrading → Database Installation Guide for Linux → 7 Removing Oracle Database Software.

The specific path is: http://docs.oracle.com/cd/E11882_01/install.112/e47689/remove_oracle_sw.htm#LADBI1336

Oracle provides a total of two ways to use deinstall:

(1) if Oracle is installed correctly, you can call the script $ORACLE_HOME/deinstall/deinstall under $ORACLE_HOME directly.

(2) if there is a problem with Oracle installation or other situations, you can download a separate tool and then use the tool to uninstall it.

The download path given by the official document is:

1. Go to URL:

Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

two。 Find the corresponding platform version in the Oracle Database 11g Release 2 download area, click "See All", and you can download the database uninstall tool at the bottom of the newly opened page.

In addition, when using a separate deinstall to uninstall, you must specify the-home parameter and check the official documentation:

(4) check the status of the database instance. If the database instance starts, close the database instance.

[oracle@DB074 ~] $ps-ef | grep smon

Oracle 3559 1 0 14:44? 00:00:00 ora_smon_cams

Oracle 3662 31107 0 14:47 pts/1 00:00:00 grep smon

[oracle@DB074 ~] $sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 11 14:47:25 2017

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SYS@cams > shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SYS@cams > exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@DB074 ~] $ps-ef | grep smon

Oracle 3675 31107 0 14:47 pts/1 00:00:00 grep smon

(5) check to make sure no oracle process is started

[oracle@DB074 ~] $ps-ef | grep ora

Root 1987 1945 0 Sep09? 00:01:16 hald-addon-storage: polling / dev/sr0 (every 2 sec)

Oracle 3677 31107 0 14:48 pts/1 00:00:00 ps-ef

Oracle 3678 31107 0 14:48 pts/1 00:00:00 grep ora

Root 31106 30170 0 11:34 pts/1 00:00:00 su-oracle

Oracle 31107 31106 0 11:34 pts/1 00:00:00-bash

(6) switch to the root user and delete the installation directory completely (if you are worried about manual slippage, some operations can be completed under the oracle user)

[root@DB074 oracle] # cd /

[root@DB074 oracle] # rm-rf u01 /

(7) Delete the files under the bin. If you don't know which bin path you are under (such as / usr/bin,/usr/local/bin, etc.), you can find the system path first.

[root@DB074 /] # find /-name oraenv

/ usr/local/bin/oraenv

[root@DB074 /] # find /-name dbhome

/ usr/local/bin/dbhome

[root@DB074 /] # find /-name coraenv

/ usr/local/bin/coraenv

[root@DB074 /] # rm-rf / usr/local/bin/oraenv

[root@DB074 /] # rm-rf / usr/local/bin/dbhome

[root@DB074 /] # rm-rf / usr/local/bin/coraenv

(8) Delete configuration file

[root@DB074 ~] # rm-rf / etc/oraInst.loc

[root@DB074 ~] # rm-rf / opt/ORCLfmap

[root@DB074 ~] # rm-rf / etc/oratab

(9) Delete the home directory

[root@DB074 ~] # rm-rf / home/oracle

(10) Delete oracle users and user groups

[root@DB074] # userdel-f oracle

[root@DB074] # groupdel-f oinstall

[root@DB074] # groupdel-f dba

(11) check whether there is a self-starting service and delete it.

[root@DB074 ~] # chkconfig-list

[root@DB074] # chkconfig-- del XXX

3. Comparison of methods

(1) both methods can delete database software. the method of using deinstall tool is relatively soft, and the method of command line deletion is more violent.

(2) after the first method is deleted, some information will be retained, such as environment variables, installation software, custom directory, etc.; the second method can delete the database completely, or only part of the content can be deleted. Of course, there is no difference between the two methods, and they can be combined according to the situation.

(3) during the operation of the second method, the rm-rf command will be executed many times under the root user. It is recommended that the user be careful.

(4) there is no attempt to uninstall using the downloaded deinstall tool in this paper. Readers can try it in the test environment after work.

This is the end of this article on "how to use deinstall and command line to delete Oracle database software". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report