Thứ Hai, 19 tháng 1, 2026

Hướng dẫn từng bước gỡ cài đặt Oracle Database 23ai

Việc gỡ cài đặt Oracle Database 23ai sẽ loại bỏ tất cả các thành phần bao gồm các tệp dữ liệu, cơ sở dữ liệu, trình lắng nghe và phần mềm.

Nếu bạn muốn lưu dữ liệu của mình nhưng lại muốn gỡ bỏ phần mềm và cơ sở dữ liệu Oracle Database 23ai , thì bạn có thể xuất dữ liệu trước khi gỡ cài đặt vì quá trình gỡ cài đặt sẽ xóa tất cả các tệp khỏi thư mục nơi Oracle Database 23ai được cài đặt. Cơ sở dữ liệu sẽ không còn hoạt động sau khi gỡ cài đặt.

Có thể gỡ cài đặt Oracle Database 23ai bằng hai phương pháp sau:
1) Gỡ cài đặt bằng các lệnh cấu hình và gói RPM.
2) Gỡ cài đặt bằng cách gỡ cài đặt nhị phân.


1) Gỡ cài đặt bằng các lệnh cấu hình và gói RPM.


Bước 1: Trước tiên, hãy thu thập thông tin chi tiết về cơ sở dữ liệu và trình lắng nghe, sau đó xuất dữ liệu nếu cần.
[oracle@orahost ~]$ id
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
 
[oracle@orahost ~]$ ps -ef | grep pmon
oracle      1750       1  0 11:31 ?        00:00:00 db_pmon_FREE
oracle      3581    3532  0 11:40 pts/1    00:00:00 grep --color=auto pmon

[oracle@orahost ~]$ ps -ef | grep tns
root           5       2  0 11:30 ?        00:00:00 [netns]
oracle      1740       1  0 11:31 ?        00:00:00 /opt/oracle/product/23ai/dbhomeFree/bin/tnslsnr LISTENER -inherit
oracle      3583    3532  0 11:40 pts/1    00:00:00 grep --color=auto tns

[oracle@orahost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Thu May 16 11:41:00 2024
Version 23.4.0.24.05

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

Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.4.0.24.05

SQL> select name,open_mode from v$database;

NAME   OPEN_MODE
--------- ------------
FREE   READ WRITE

#Thực hiện lệnh dưới đây để sao lưu toàn bộ cơ sở dữ liệu trước khi gỡ cài đặt Oracle Database 23ai .
[oracle@orahost ~]$ expdp directory=DIR_TEST dumpfile=FULL_DB_%U.dmp logfile=FULL_DB.log full=y

Bước 2: Thực thi lệnh " oracle-free-23ai delete"  với quyền người dùng root.
[root@orahost ~]# id
uid=0(root) gid=0(root) groups=0(root)

#Lệnh dưới đây sẽ chỉ xóa tất cả các tệp dữ liệu, trình lắng nghe và tệp cấu hình. Lệnh này sẽ không xóa nhật ký và phần mềm Oracle Home.
[root@orahost ~]# /etc/init.d/oracle-free-23ai delete
Deleting Oracle Listener.
Deleting Oracle Database FREE.
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
Unable to copy the file "/tmp/oratab" to "/etc/oratab".
84% complete
100% complete
Database deletion completed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE0.log" for further details. 

[root@orahost ~]# ps -ef | grep pmon
root        4199    3487  0 11:47 pts/1    00:00:00 grep --color=auto pmon

[root@orahost ~]# ps -ef | grep tns
root           5       2  0 11:30 ?        00:00:00 [netns]
root        4219    3487  0 11:47 pts/1    00:00:00 grep --color=auto tns   

Bạn có thể kiểm tra phần mềm và các tệp cấu hình.
[root@orahost ~]# cd /opt
[root@orahost opt]# ls -ltr
drwxr-xr-x 8 root   root     136 May 15 02:41 VBoxGuestAdditions-6.1.22
drwxr-xr-x 3 root   root      22 May 16 05:27 ORCLfmap
drwxr-xr-x 9 oracle oinstall 113 May 16 05:32 oracle

[root@orahost opt]# cd oracle
[root@orahost oracle]# ls -ltr
drwxr-xr-x  3 oracle oinstall   18 May 15 04:36 product
drwxrwxr-x 25 oracle oinstall 4096 May 16 05:27 diag
drwxr-xr-x  4 oracle oinstall   31 May 16 05:31 cfgtoollogs
drwxrwx---  4 oracle oinstall   78 May 16 11:44 oraInventory
drwxr-x---  2 oracle oinstall    6 May 16 11:44 admin
drwxr-x---  2 oracle oinstall    6 May 16 11:44 audit
drwxr-x---  2 oracle oinstall    6 May 16 11:44 oradata

[root@orahost oracle]# cd oradata
[root@orahost oradata]# ls -ltr
total 0

[root@orahost oradata]# cd ..
[root@orahost oracle]# cd product
[root@orahost product]# ls -ltr
drwxrwxr-x 3 oracle oinstall 24 May 15 04:36 23ai
[root@orahost product]# cd 23ai
[root@orahost 23ai]# ls -ltr
drwxrwxr-x 64 oracle oinstall 4096 May 16 11:32 dbhomeFree
[root@orahost 23ai]# cd dbhomeFree/

[root@orahost dbhomeFree]# pwd
/opt/oracle/product/23ai/dbhomeFree
[root@orahost dbhomeFree]# ls -ltr
-rw-r--r--  1 oracle oinstall   852 Aug 18  2015 env.ora
-rw-r--r--  1 oracle oinstall  2927 Jul 20  2020 schagent.conf
-rwxr-x---  1 oracle oinstall  2500 Oct 24  2023 runInstaller
-rwx------  1 oracle oinstall   525 Apr 24 15:45 root.sh
-rwxrwxr-x  1 oracle oinstall  5780 Apr 24 15:45 LICENSE
drwxr-xr-x  2 oracle oinstall    26 May 15 04:36 QOpatch
drwxr-xr-x 13 oracle oinstall  4096 May 15 04:36 OPatch
drwxr-xr-x  5 oracle oinstall    52 May 15 04:36 R
drwxr-xr-x  2 oracle oinstall   102 May 15 04:36 addnode
drwxr-xr-x 10 oracle oinstall   107 May 15 04:37 assistants
drwxr-xr-x  2 oracle oinstall  8192 May 15 04:37 bin
drwxr-xr-x  4 oracle oinstall    87 May 15 04:37 clone
drwxr-xr-x  6 oracle oinstall    55 May 15 04:37 crs
drwxr-xr-x  4 oracle oinstall    31 May 15 04:37 crypto
drwxr-xr-x  3 oracle oinstall    18 May 15 04:37 css
drwxr-xr-x 11 oracle oinstall   119 May 15 04:37 ctx
drwxr-xr-x  7 oracle oinstall    71 May 15 04:37 cv
drwxr-xr-x  3 oracle oinstall    20 May 15 04:37 data
drwxr-xr-x  5 oracle oinstall   173 May 15 04:37 deinstall
drwxr-xr-x  3 oracle oinstall    20 May 15 04:37 diagnostics
drwxr-xr-x  3 oracle oinstall    20 May 15 04:37 demo
drwxr-xr-x  3 oracle oinstall    19 May 15 04:37 dv
drwxr-xr-x  3 oracle oinstall    18 May 15 04:37 has
drwxr-xr-x  5 oracle oinstall    41 May 15 04:37 hs
drwxr-xr-x  2 oracle oinstall    29 May 15 04:37 instantclient
drwxr-x--- 12 oracle oinstall  4096 May 15 04:37 inventory
drwxr-xr-x  9 oracle oinstall    94 May 15 04:37 javavm
drwxr-xr-x  3 oracle oinstall    17 May 15 04:37 jdbc
drwxr-xr-x  6 oracle oinstall    68 May 16 05:26 jdk
drwxr-xr-x  2 oracle oinstall  4096 May 16 05:26 jlib
drwxr-xr-x 10 oracle oinstall   112 May 16 05:26 ldap
drwxr-xr-x  3 oracle oinstall 12288 May 16 05:26 lib
drwxr-xr-x  5 oracle oinstall    42 May 16 05:27 md
drwxr-xr-x  4 oracle oinstall    31 May 16 05:27 mgw
drwxr-xr-x 10 oracle oinstall   106 May 16 05:27 network
drwxr-xr-x  5 oracle oinstall    46 May 16 05:27 nls
drwxr-xr-x  8 oracle oinstall   133 May 16 05:27 odbc
drwxr-xr-x  5 oracle oinstall    42 May 16 05:27 olap
drwxr-xr-x  4 oracle oinstall    35 May 16 05:27 oml4py
drwxr-xr-x  7 oracle oinstall    65 May 16 05:27 opmn
drwxr-xr-x  5 oracle oinstall    45 May 16 05:27 oracore
drwxr-xr-x  4 oracle oinstall    29 May 16 05:27 ord
drwxr-xr-x  3 oracle oinstall    19 May 16 05:27 oss
drwxr-xr-x  8 oracle oinstall  4096 May 16 05:27 oui
drwxr-xr-x  5 oracle oinstall    39 May 16 05:27 perl
drwxr-xr-x  6 oracle oinstall   106 May 16 05:27 plsql
drwxr-xr-x  7 oracle oinstall    88 May 16 05:27 precomp
drwxr-xr-x  5 oracle oinstall    39 May 16 05:27 python
drwxr-xr-x  4 oracle oinstall    29 May 16 05:27 racg
drwxr-xr-x 13 oracle oinstall   140 May 16 05:27 rdbms
drwxr-xr-x  3 oracle oinstall    21 May 16 05:27 relnotes
drwxr-xr-x  3 oracle oinstall    18 May 16 05:27 slax
drwxr-xr-x  5 oracle oinstall   119 May 16 05:27 sdk
drwxr-xr-x  4 oracle oinstall    28 May 16 05:27 sqlcl
drwxr-xr-x  3 oracle oinstall    17 May 16 05:27 sqlj
drwxr-xr-x  3 oracle oinstall  4096 May 16 05:27 sqlpatch
drwxr-xr-x  6 oracle oinstall    53 May 16 05:27 sqlplus
drwxr-xr-x  6 oracle oinstall    54 May 16 05:27 srvm
drwxr-xr-x  3 oracle oinstall    17 May 16 05:27 ucp
drwxr-xr-x  4 oracle oinstall    31 May 16 05:27 usm
drwxr-xr-x  2 oracle oinstall    33 May 16 05:27 utl
drwxr-x---  7 oracle oinstall    69 May 16 05:27 xdk
-rw-rw----  1 oracle oinstall   130 May 16 05:27 oraInst.loc
drwxrwx--- 11 oracle oinstall  4096 May 16 05:27 install
drwxrwxr-x  4 oracle oinstall    33 May 16 05:32 log
drwxrwx---  4 oracle oinstall    33 May 16 05:35 cfgtoollogs
drwxr-xr-x  3 oracle oinstall    18 May 16 06:16 admin
drwxr-xr-x  2 oracle oinstall    41 May 16 11:44 dbs

[root@orahost dbhomeFree]# ls -ltr /etc/sysconfig/oracle-free-23ai.conf 
-rwxrwxr-x 1 root root 701 Apr 24 15:46 /etc/sysconfig/oracle-free-23ai.conf

[root@orahost dbhomeFree]# cd /opt/oracle/product/23ai/dbhomeFree/network/admin/
[root@orahost admin]# ls -ltr
-rw-r--r-- 1 oracle oinstall 1866 May 19  2021 shrept.lst
drwxr-xr-x 2 oracle oinstall   64 May 16 05:27 samples

Bước 3: Xóa gói RPM Oracle Database 23ai  bằng quyền người dùng root.
Thực hiện lệnh dưới đây để gỡ bỏ gói RPM Oracle Database 23ai, thao tác này sẽ gỡ bỏ phần mềm Oracle Database 23ai . Tuy nhiên, một số nội dung trong thư mục gốc Oracle (/opt/oracle) vẫn sẽ còn lại. Bạn có thể xóa chúng thủ công.

Di chuyển hoặc xóa tệp /etc/oratab trước khi thực thi lệnh này.

[root@orahost ~]# mv /etc/oratab /etc/oratab_bkp

[root@orahost ~]# yum remove oracle-database-free-23ai
Repository ol8_UEKR7 is listed more than once in the configuration
Dependencies resolved.
==============================================================================================================================================================
 Package                                            Architecture                    Version                           Repository                         Size
==============================================================================================================================================================
Removing:
 oracle-database-free-23ai                          x86_64                          1.0-1                             @@System                          3.6 G

Transaction Summary
==============================================================================================================================================================
Remove  1 Package

Freed space: 3.6 G
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                      1/1 
  Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                                                                                               1/1 
  Erasing          : oracle-database-free-23ai-1.0-1.x86_64                                                                                               1/1 
  Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64                                                                                               1/1 
  Verifying        : oracle-database-free-23ai-1.0-1.x86_64                                                                                               1/1 

Removed:
  oracle-database-free-23ai-1.0-1.x86_64                                                                                                                      

Complete!

Bạn có thể kiểm tra đường dẫn $ORACLE_HOME . Bạn sẽ thấy tất cả các tệp phần mềm đã bị xóa.
[root@orahost ~]# ls -ld /opt/oracle/product/23ai/dbhomeFree
ls: cannot access '/opt/oracle/product/23ai/dbhomeFree': No such file or directory

[root@orahost ~]# cd /opt
[root@orahost opt]# ls -ltr
drwxr-xr-x 8 root   root     136 May 15 02:41 VBoxGuestAdditions-6.1.22
drwxr-xr-x 3 root   root      22 May 16 05:27 ORCLfmap
drwxr-xr-x 5 oracle oinstall  50 May 17 07:57 oracle

[root@orahost opt]# cd oracle
[root@orahost oracle]# ls -ltr
drwxrwxr-x 25 oracle oinstall 4096 May 16 05:27 diag
drwxr-xr-x  4 oracle oinstall   31 May 16 05:31 cfgtoollogs
drwxr-x---  3 oracle oinstall   18 May 17 07:55 audit

Bước 4: Xóa gói RPM  cài đặt sẵn Oracle Database 23ai bằng quyền người dùng root.
Bạn cũng có thể gỡ bỏ gói RPM cài đặt trước Oracle Database 23ai nếu bạn chỉ cài đặt Oracle Database 23ai trên hệ thống và không cài đặt thêm phần mềm Oracle Database nào khác, nhưng điều này là tùy chọn.

[root@orahost ~]# rpm -qa | grep -i database
oracle-database-preinstall-23ai-1.0-2.el8.x86_64

#Thực thi lệnh dưới đây với quyền người dùng root .
[root@orahost ~]# id
uid=0(root) gid=0(root) groups=0(root)

[root@orahost ~]# yum remove oracle-database-preinstall-23ai
Repository ol8_UEKR7 is listed more than once in the configuration
Dependencies resolved.
==============================================================================================================================================================
 Package                                               Architecture                 Version                         Repository                           Size
==============================================================================================================================================================
Removing:
 oracle-database-preinstall-23ai                       x86_64                       1.0-2.el8                       @@commandline                        78 k

Transaction Summary
==============================================================================================================================================================
Remove  1 Package

Freed space: 78 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                      1/1 
  Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                     1/1 
  Erasing          : oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                     1/1 
  Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                     1/1 
  Verifying        : oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                     1/1 

Removed:
  oracle-database-preinstall-23ai-1.0-2.el8.x86_64                                                                                                            

Complete!

[root@orahost ~]# rpm -qa | grep -i database
[root@orahost ~]#



2) Gỡ cài đặt bằng cách gỡ cài đặt nhị phân.

Đăng nhập với tư cách người dùng oracle và cập nhật các biến môi trường.

[oracle@orahost ~]$ id
uid=54321(oracle) gid=54321(oinstall) nhóm=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
 
[oracle@orahost ~]$ ps -ef | grep pmon
oracle 33071 2655 0 08:35 ? 00:00:00 db_pmon_FREE
oracle 34026 33845 0 08:50 pts/1 00:00:00 grep --color=auto pmon
 
[oracle@orahost ~]$ ps -ef | grep tns
root 5 2 0 07:18 ? 00:00:00 [netns]
oracle 30978 2655 0 08:25 ? 00:00:00 /opt/oracle/product/23ai/dbhomeFree/bin/tnslsnr LISTENER -inherit
oracle 34028 33845 0 08:50 pts/1 00:00:00 grep --color=auto tns

[oracle@orahost ~]$ sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Fri May 17 08:50:41 2024
Version 23.4.0.24.05

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

Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.4.0.24.05

SQL> select name,open_mode from v$database;

NAME   OPEN_MODE
--------- --------------------
FREE   READ WRITE


[oracle@orahost ~]$ id
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)

[oracle@orahost ~]$ cd /opt/oracle/product/23ai/dbhomeFree/
 
[oracle@orahost dbhomeFree]$ ls -ld deinstall/
drwxr-xr-x 5 oracle oinstall 173 May 17 08:16 deinstall/

[oracle@orahost dbhomeFree]$ cd deinstall/
[oracle@orahost deinstall]$ ls -ltr
-rwxr-x--- 1 oracle oinstall 33333 Jan  6  2015 sshUserSetup.sh
-rwxr-x--- 1 oracle oinstall 35930 Apr 27  2021 deinstall.pl
-rwxr-x--- 1 oracle oinstall 15817 Jun 28  2023 bootstrap.pl
-rw-r----- 1 oracle oinstall  8208 Mar 11 23:18 deinstall.xml
-rw-r----- 1 oracle oinstall 53321 Apr 24 13:19 bootstrap_files.lst
-rwxr-x--- 1 oracle oinstall 11580 Apr 24 15:45 deinstall
drwxr-xr-x 2 oracle oinstall    32 May 17 08:16 response
drwxr-xr-x 2 oracle oinstall   100 May 17 08:16 jlib
drwxr-xr-x 2 oracle oinstall    33 May 17 08:16 utl


[oracle@orahost deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2024-05-17_08-52-32AM/logs/

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


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


Checking for existence of the Oracle home location /opt/oracle/product/23ai/dbhomeFree
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /opt/oracle
Checking for existence of central inventory location /opt/oracle/oraInventory

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2024-05-17_08-52-32AM/logs/netdc_check2024-05-17_08-53-07AM.log

Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2024-05-17_08-52-32AM/logs/databasedc_check2024-05-17_08-53-07AM.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 [FREE]: 

###### For Database 'FREE' ######

Single Instance Database
The diagnostic destination location of the database: /opt/oracle/diag/rdbms/free
Storage type used by the Database: FS
Database file location: /opt/oracle/oradata/FREE
Fast recovery area location: Does not exist
database spfile location: /opt/oracle/product/23ai/dbhomeFree/dbs/spfileFREE.ora

The details of database(s) FREE have been discovered automatically. Do you still want to modify the details of FREE database(s)? [n]:  

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /opt/oracle/product/23ai/dbhomeFree
Inventory Location where the Oracle home registered is: /opt/oracle/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration. The databases will be deleted and will not be useful upon de-configuration : FREE
Database unique name : FREE
Storage used : FS
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2024-05-17_08-52-32AM/logs/deinstall_deconfig2024-05-17_08-52-59-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2024-05-17_08-52-32AM/logs/deinstall_deconfig2024-05-17_08-52-59-AM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2024-05-17_08-52-32AM/logs/databasedc_clean2024-05-17_08-53-07AM.log
Database Clean Configuration START FREE
This operation may take few minutes.
Database Clean Configuration END FREE

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2024-05-17_08-52-32AM/logs/netdc_clean2024-05-17_08-53-07AM.log

De-configuring Single Instance listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped successfully.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.

De-configuring Listener configuration file...
Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

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 : FREE
Following Single Instance listener(s) were de-configured successfully: LISTENER
#######################################################################


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

Using properties file /tmp/deinstall2024-05-17_08-52-32AM/response/deinstall_2024-05-17_08-52-59-AM.rsp
Location of logs /tmp/deinstall2024-05-17_08-52-32AM/logs/

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



####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2024-05-17_08-52-32AM/logs/deinstall_deconfig2024-05-17_08-52-59-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2024-05-17_08-52-32AM/logs/deinstall_deconfig2024-05-17_08-52-59-AM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to orahost
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2024-05-17_08-52-32AM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Oracle Universal Installer clean START

Detach Oracle home 'OraDBHome23aiFree' from the central inventory on the local node : Done

Delete directory '/opt/oracle/product/23ai/dbhomeFree' on the local node : Done

Delete directory '/opt/oracle/oraInventory' on the local node : Done

Failed to delete the directory '/opt/oracle'. Either user has no permission to delete or it is in use.
Delete directory '/opt/oracle' on the local node : Failed <<<<

You can find a log of this session at:
'/tmp/deinstall2024-05-17_08-52-32AM/logs/Cleanup2024-05-17_08-55-27AM.log'

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 'OraDBHome23aiFree' from the central inventory on the local node.
Successfully deleted directory '/opt/oracle/product/23ai/dbhomeFree' on the local node.
Successfully deleted directory '/opt/oracle/oraInventory' on the local node.
Failed to delete directory '/opt/oracle' on the local node due to error : Either user has no permission to delete or file is in use.
Review the permissions and manually delete '/opt/oracle' on local node.

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

Oracle Universal Installer cleanup completed with errors.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'orahost' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'orahost' at the end of the session.
Review the permissions and contents of '/opt/oracle' on nodes(s) 'orahost'.
If there are no Oracle home(s) associated with '/opt/oracle', manually delete '/opt/oracle' and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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

[root@orahost ~]# ps -ef | grep pmon
 
[root@orahost ~]# ps -ef | grep tns
root           5       2  0 07:18 ?        00:00:00 [netns]
root       37057    3487  0 08:58 pts/1    00:00:00 grep --color=auto tns

#Sau khi quá trình gỡ cài đặt hoàn tất, bạn có thể xóa thủ công các tệp bên dưới bằng quyền người dùng root .
[root@orahost ~]# id
uid=0(root) gid=0(root) groups=0(root)

[root@orahost ~]# rm -rf /opt/oracle
[root@orahost ~]# rm -rf /etc/oraInst.loc
[root@orahost ~]# rm -rf /opt/ORCLfmap
[root@orahost ~]# rm -rf /etc/oratab

[root@orahost ~]# ls -ld /opt/oracle/product/23ai/dbhomeFree
ls: cannot access '/opt/oracle/product/23ai/dbhomeFree': No such file or directory

#Bây giờ hãy gỡ bỏ các gói RPM bên dưới. Bạn sẽ nhận được thông báo cảnh báo khi gỡ bỏ gói RPM đầu tiên và thông báo lỗi khi gỡ bỏ gói RPM thứ hai vì bạn đã gỡ cài đặt phần mềm trước đó. Lệnh đầu tiên vẫn sẽ gỡ bỏ gói RPM, nhưng đối với lệnh thứ hai, bạn phải thêm tùy chọn xóa vào lệnh yum.
[root@orahost ~]# rpm -qa | grep -i database
oracle-database-free-23ai-1.0-1.x86_64
oracle-database-preinstall-23ai-1.0-2.el8.x86_64

[root@orahost ~]#yum remove oracle-database-free-23ai
....
warning: file /opt/oracle/product/23ai/dbhomeFree/OPatch/auto: remove failed: No such file or directory
warning: file /opt/oracle/product/23ai/dbhomeFree/OPatch/README.txt: remove failed: No such file or directory
warning: file /opt/oracle/product/23ai/dbhomeFree/OPatch: remove failed: No such file or directory
warning: file /opt/oracle/product/23ai/dbhomeFree/LICENSE: remove failed: No such file or directory
warning: file /opt/oracle/product/23ai/dbhomeFree: remove failed: No such file or directory
warning: file /opt/oracle/product/23ai: remove failed: No such file or directory

[root@orahost ~]# yum remove oracle-database-preinstall-23ai
Repository ol8_UEKR7 is listed more than once in the configuration
History database is not writable: SQLite error on "/var/lib/dnf/history.sqlite": Executing an SQL statement failed: database is locked
Error: SQLite error on "/var/lib/dnf/history.sqlite": Executing an SQL statement failed: database is locked
[root@orahost ~]# rpm -qa | grep database
oracle-database-preinstall-23ai-1.0-2.el8.x86_64

Để khắc phục điều này, bạn có thể thực hiện các lệnh dưới đây để xóa các gói RPM này.

[root@orahost ~]# rpm -qa | grep database
oracle-database-preinstall-23ai-1.0-2.el8.x86_64

[root@orahost ~]# rpm --erase oracle-database-preinstall-23ai

[root@orahost ~]# rpm -qa | grep database
[root@orahost ~]# 


Cảm ơn bạn đã đọc bài viết này! Hãy bình luận nếu bạn thích bài viết này! Nhấn vào nút THEO DÕI để nhận thông báo về các bài viết tiếp theo!
=============================
TƯ VẤN: Click hoặc Hotline/Zalo 090.29.12.888
=============================
Website không chứa bất kỳ quảng cáo nào, mọi đóng góp để duy trì phát triển cho website (donation) xin vui lòng gửi về STK 90.2142.8888 - Ngân hàng Vietcombank Thăng Long - TRAN VAN BINH
=============================
Nếu bạn không muốn bị AI thay thế và tiết kiệm 3-5 NĂM trên con đường trở thành DBA chuyên nghiệp hay làm chủ Database thì hãy đăng ký ngay KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE, được Coaching trực tiếp từ tôi với toàn bộ bí kíp thực chiến, thủ tục, quy trình của gần 20 năm kinh nghiệm (mà bạn sẽ KHÔNG THỂ tìm kiếm trên Internet/Google) từ đó giúp bạn dễ dàng quản trị mọi hệ thống Core tại Việt Nam và trên thế giới, đỗ OCP.
- CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
- Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
2 khóa học online qua video giúp bạn nhanh chóng có những kiến thức nền tảng về Linux, Oracle, học mọi nơi, chỉ cần có Internet/4G:
- Oracle cơ bản: https://bit.ly/admin_1200
- Linux: https://bit.ly/linux_1200
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile/Zalo: 0902912888
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: https://www.youtube.com/@binhguru
👨 Tiktok: https://www.tiktok.com/@binhguru
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhguru
👨 Podcast: https://www.podbean.com/pu/pbblog-eskre-5f82d6
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
cơ sở dữ liệu, cơ sở dữ liệu quốc gia, database, AI, trí tuệ nhân tạo, artificial intelligence, machine learning, deep learning, LLM, ChatGPT, DeepSeek, Grok, oracle tutorial, học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,sql tutorial, khóa học pl/sql tutorial, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c/21c/23c/23ai, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail,oracle RAC, ASM, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, postgresql tutorial, mysql tutorial, mariadb tutorial, ms sql server tutorial, nosql, mongodb tutorial, oci, cloud, middleware tutorial, docker, k8s, micro service, hoc solaris tutorial, hoc linux tutorial, hoc aix tutorial, unix tutorial, securecrt, xshell, mobaxterm, putty

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master