Configuration Details:
Database: Oracle DB 12.1.0.2 EE 64 Bit
Operating System: Oracle Enterprise Linux 6.3 64 Bit
Single Instance/RAC: Single Instance
Pluggable(PDB/CDB): No
Multi-instance environment: No (Only One instance is running on server)
Points to be checked before starting installation prerequisites:
1) How many are DB instances running on server ?
2) Do we have to drop all instances or just one in case of multi-instance environment ?
3) Have we taken full DB cold backup before dropping the DB ?
4) Have we taken proper approval from customer to drop the DB and de-install the software ?
Step 1: Check number of instances running on server.
[oracle@rac1 ~]$ env | grep ORA
ORACLE_SID=demo
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
ORACLE_SID=demo
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
[oracle@rac1 ~]$ ps -ef | grep pmon
oracle 7685 1 0 Aug14 ? 00:00:00 ora_pmon_demo
oracle 8575 5531 0 00:01 pts/0 00:00:00 grep pmon
oracle 7685 1 0 Aug14 ? 00:00:00 ora_pmon_demo
oracle 8575 5531 0 00:01 pts/0 00:00:00 grep pmon
[oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$ ls -ltr
-rw-r--r-- 1 oracle oinstall 2992 Feb 3 2012 init.ora
-rw-r----- 1 oracle oinstall 24 Jul 12 12:23 lkDEMO
-rw-r----- 1 oracle oinstall 7680 Jul 12 12:26 orapwdemo
-rw-rw---- 1 oracle oinstall 1544 Jul 21 19:18 hc_demo.dat
-rw-r----- 1 oracle oinstall 3584 Aug 14 23:59 spfiledemo.ora
[oracle@rac1 dbs]$ ls -ltr
-rw-r--r-- 1 oracle oinstall 2992 Feb 3 2012 init.ora
-rw-r----- 1 oracle oinstall 24 Jul 12 12:23 lkDEMO
-rw-r----- 1 oracle oinstall 7680 Jul 12 12:26 orapwdemo
-rw-rw---- 1 oracle oinstall 1544 Jul 21 19:18 hc_demo.dat
-rw-r----- 1 oracle oinstall 3584 Aug 14 23:59 spfiledemo.ora
[oracle@rac1 dbs]$ cat /etc/oratab
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
demo:/u01/app/oracle/product/12.1.0.2/db_1:N
[oracle@rac1 dbs]$
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
demo:/u01/app/oracle/product/12.1.0.2/db_1:N
[oracle@rac1 dbs]$
Step 2: Take proper approval from customer and take full cold backup of the DB.
You can take cold backup by rman or cp or by any third party tool.
Ensure backup should contain data files, control files, archive log files, pfile, spfile, password file, sqlnet.ora, listener.ora, tnsnames.ora files, names and locations of data files,control files, redo log members, temp files,etc.
Names and Locations of D+C+R+T:
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 15 00:14:52 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options
SQL>
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DEMO READ WRITE
SQL> set lines 300 pages 3000
SQL> select name from v$datafile;
NAME
--------------------------------------------------------
/u01/db/data/DEMO/datafile/o1_mf_system_jgqsrw3d_.dbf
/u01/db/data/DEMO/datafile/o1_mf_sysaux_jgqsqgwz_.dbf
/u01/db/data/DEMO/datafile/o1_mf_undotbs1_jgqstnlv_.dbf
/u01/db/data/DEMO/datafile/o1_mf_users_jgqstm93_.dbf
SQL> select name from v$controlfile;
NAME
---------------------------------------------------
/u01/db/redo/DEMO/controlfile/o1_mf_jgqsvk46_.ctl
/u01/db/control/DEMO/controlfile/o1_mf_jgqsvk86_.ctl
SQL> col member for a56
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_ CON_ID
---------- ------- ------- -------------------------------------------------------- --- ----------
3 ONLINE /u01/db/redo/DEMO/onlinelog/o1_mf_3_jgqsvvfo_.log NO 0
3 ONLINE /u01/db/control/DEMO/onlinelog/o1_mf_3_jgqsvvh9_.log NO 0
2 ONLINE /u01/db/redo/DEMO/onlinelog/o1_mf_2_jgqsvrnn_.log NO 0
2 ONLINE /u01/db/control/DEMO/onlinelog/o1_mf_2_jgqsvrot_.log NO 0
1 ONLINE /u01/db/redo/DEMO/onlinelog/o1_mf_1_jgqsvnr5_.log NO 0
1 ONLINE /u01/db/control/DEMO/onlinelog/o1_mf_1_jgqsvnv0_.log NO 0
6 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME CON_ID
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ --------- ----------
1 1 4 52428800 512 2 NO INACTIVE 1600117 12-JUL-21 1602985 12-JUL-21 0
2 1 5 52428800 512 2 NO INACTIVE 1602985 12-JUL-21 1703532 21-JUL-21 0
3 1 6 52428800 512 2 NO CURRENT 1703532 21-JUL-21 2.8147E+14 0
SQL> select name from v$tempfile;
NAME
-------------------------------------------------------
/u01/db/data/DEMO/datafile/o1_mf_temp_jgqsw0qr_.tmp
SQL> create pfile='/u01/app/oracle/product/12.1.0.2/db_1/pfile_bkp.ora' from spfile;
File created.
Full DB cold backup and parameter/network file backup
Create backup location and stop listener and DB services.
[root@rac1 /]# mkdir -p /backup
[root@rac1 /]# chown -R oracle:oinstall /backup
[root@rac1 /]# chmod -R 755 /backup
[oracle@rac1 /]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 15 00:24:00 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
[oracle@rac1 ~]$ ps -ef | grep tns
root 10 2 0 Aug18 ? 00:00:00 [netns]
oracle 10506 1 0 08:25 ? 00:00:00 /u01/app/oracle/product/12.1.0.2/db_1/bin/tnslsnr LISTENER_demo -inherit
oracle 10524 5531 0 08:26 pts/0 00:00:00 grep tns
[oracle@rac1 ~]$
[oracle@rac1 ~]$ lsnrctl stop LISTENER_demo
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 19-AUG-2021 08:26:44
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.28.1)(PORT=1530)))
The command completed successfully
[oracle@rac1 ~]$ cp /u01/db/data/DEMO/datafile/o1_mf_system_jgqsrw3d_.dbf /backup
[oracle@rac1 ~]$ cp /u01/db/data/DEMO/datafile/o1_mf_sysaux_jgqsqgwz_.dbf /backup
[oracle@rac1 ~]$ cp /u01/db/data/DEMO/datafile/o1_mf_undotbs1_jgqstnlv_.dbf /backup
[oracle@rac1 ~]$ cp /u01/db/data/DEMO/datafile/o1_mf_users_jgqstm93_.dbf /backup
[oracle@rac1 ~]$ cp /u01/db/redo/DEMO/controlfile/o1_mf_jgqsvk46_.ctl /backup
[oracle@rac1 ~]$ cp /u01/db/control/DEMO/controlfile/o1_mf_jgqsvk86_.ctl /backup
[oracle@rac1 ~]$ cp /u01/db/redo/DEMO/onlinelog/o1_mf_3_jgqsvvfo_.log /backup
[oracle@rac1 ~]$ cp /u01/db/control/DEMO/onlinelog/o1_mf_3_jgqsvvh9_.log /backup
[oracle@rac1 ~]$ cp /u01/db/redo/DEMO/onlinelog/o1_mf_2_jgqsvrnn_.log /backup
[oracle@rac1 ~]$ cp /u01/db/control/DEMO/onlinelog/o1_mf_2_jgqsvrot_.log /backup
[oracle@rac1 ~]$ cp /u01/db/redo/DEMO/onlinelog/o1_mf_1_jgqsvnr5_.log /backup
[oracle@rac1 ~]$ cp /u01/db/control/DEMO/onlinelog/o1_mf_1_jgqsvnv0_.log /backup
[oracle@rac1 ~]$ cp /u01/db/data/DEMO/datafile/o1_mf_temp_jgqsw0qr_.tmp /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/pfile_bkp.ora /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/dbs/spfiledemo.ora /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/dbs/orapwdemo /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/network/admin/tnsnames.ora /backup
[oracle@rac1 ~]$ cp /u01/app/oracle/product/12.1.0.2/db_1/network/admin/sqlnet.ora /backup
Ensure all backed-up files are located in /backup directory.
[oracle@rac1 ~]$ cd /backup
[oracle@rac1 backup]$
[oracle@rac1 backup]$ ls -ltr
total 1834592
-rw-r----- 1 oracle oinstall 817897472 Aug 19 08:29 o1_mf_system_jgqsrw3d_.dbf
-rw-r----- 1 oracle oinstall 639639552 Aug 19 08:29 o1_mf_sysaux_jgqsqgwz_.dbf
-rw-r----- 1 oracle oinstall 73408512 Aug 19 08:29 o1_mf_undotbs1_jgqstnlv_.dbf
-rw-r----- 1 oracle oinstall 5251072 Aug 19 08:29 o1_mf_users_jgqstm93_.dbf
-rw-r----- 1 oracle oinstall 10043392 Aug 19 08:32 o1_mf_jgqsvk46_.ctl
-rw-r----- 1 oracle oinstall 10043392 Aug 19 08:32 o1_mf_jgqsvk86_.ctl
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:33 o1_mf_3_jgqsvvfo_.log
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:33 o1_mf_3_jgqsvvh9_.log
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:33 o1_mf_2_jgqsvrnn_.log
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:33 o1_mf_2_jgqsvrot_.log
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:33 o1_mf_1_jgqsvnr5_.log
-rw-r----- 1 oracle oinstall 52429312 Aug 19 08:34 o1_mf_1_jgqsvnv0_.log
-rw-r----- 1 oracle oinstall 62922752 Aug 19 08:34 o1_mf_temp_jgqsw0qr_.tmp
-rw-r--r-- 1 oracle oinstall 995 Aug 19 08:34 pfile_bkp.ora
-rw-r----- 1 oracle oinstall 3584 Aug 19 08:35 spfiledemo.ora
-rw-r----- 1 oracle oinstall 7680 Aug 19 08:36 orapwdemo
-rw-r--r-- 1 oracle oinstall 364 Aug 19 08:36 listener.ora
-rw-r--r-- 1 oracle oinstall 178 Aug 19 08:36 tnsnames.ora
-rw-r--r-- 1 oracle oinstall 206 Aug 19 08:38 sqlnet.ora
Step 3: First, you have to drop the database and then de-install the software.
Source the environment, shutdown the database and open in restricted mode.
[oracle@rac1 admin]$ env | grep ORA
ORACLE_SID=demo
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
[oracle@rac1 admin]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 19 08:42:06 2021
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1593835520 bytes
Fixed Size 2924880 bytes
Variable Size 939527856 bytes
Database Buffers 637534208 bytes
Redo Buffers 13848576 bytes
Database mounted.
SQL>
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DEMO MOUNTED
SQL> select instance_name,status,logins from v$instance;
INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
demo MOUNTED ALLOWED
SQL> drop database;
drop database
*
ERROR at line 1:
ORA-12719: operation requires database is in RESTRICTED mode
Note: If you start the instance in normal mode (without restricted) then it will not allow you to drop the database. You have to mount the database in RESTRICTED mode only to drop the Database. You can execute "SQL> startup restrict mount" OR "SQL> startup mount restrict", both will work.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup restrict mount;
ORACLE instance started.
Total System Global Area 1593835520 bytes
Fixed Size 2924880 bytes
Variable Size 939527856 bytes
Database Buffers 637534208 bytes
Redo Buffers 13848576 bytes
Database mounted.
SQL>
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DEMO MOUNTED
SQL> select instance_name,status,logins from v$instance;
INSTANCE_NAME STATUS LOGINS
---------------- ------------ ----------
demo MOUNTED RESTRICTED
SQL> drop database;
Database dropped.
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> exit
[oracle@rac1 admin]$
You can also verify alert log file.
[oracle@rac1 trace]$ cat alert_demo.log
Completed: ALTER DATABASE MOUNT
Thu Aug 19 09:49:13 2021
drop database
Thu Aug 19 09:49:13 2021
Deleted Oracle managed file /u01/db/data/DEMO/datafile/o1_mf_system_jgqsrw3d_.dbf
Deleted Oracle managed file /u01/db/data/DEMO/datafile/o1_mf_sysaux_jgqsqgwz_.dbf
Deleted Oracle managed file /u01/db/data/DEMO/datafile/o1_mf_undotbs1_jgqstnlv_.dbf
Deleted Oracle managed file /u01/db/data/DEMO/datafile/o1_mf_users_jgqstm93_.dbf
Deleted Oracle managed file /u01/db/redo/DEMO/onlinelog/o1_mf_3_jgqsvvfo_.log
Deleted Oracle managed file /u01/db/control/DEMO/onlinelog/o1_mf_3_jgqsvvh9_.log
Deleted Oracle managed file /u01/db/redo/DEMO/onlinelog/o1_mf_2_jgqsvrnn_.log
Deleted Oracle managed file /u01/db/control/DEMO/onlinelog/o1_mf_2_jgqsvrot_.log
Deleted Oracle managed file /u01/db/redo/DEMO/onlinelog/o1_mf_1_jgqsvnr5_.log
Deleted Oracle managed file /u01/db/control/DEMO/onlinelog/o1_mf_1_jgqsvnv0_.log
Deleted Oracle managed file /u01/db/redo/DEMO/controlfile/o1_mf_jgqsvk46_.ctl
Deleted Oracle managed file /u01/db/control/DEMO/controlfile/o1_mf_jgqsvk86_.ctl
Shutting down archive processes
Archiving is disabled
Ensure that all files are deleted from respective directories.
[oracle@rac1 ~]$ ls -ltr /u01/db/data/DEMO/datafile/o1_mf_system_jgqsrw3d_.dbf
ls: cannot access /u01/db/data/DEMO/datafile/o1_mf_system_jgqsrw3d_.dbf: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/data/DEMO/datafile/o1_mf_sysaux_jgqsqgwz_.dbf
ls: cannot access /u01/db/data/DEMO/datafile/o1_mf_sysaux_jgqsqgwz_.dbf: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/data/DEMO/datafile/o1_mf_undotbs1_jgqstnlv_.dbf
ls: cannot access /u01/db/data/DEMO/datafile/o1_mf_undotbs1_jgqstnlv_.dbf: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/data/DEMO/datafile/o1_mf_users_jgqstm93_.dbf
ls: cannot access /u01/db/data/DEMO/datafile/o1_mf_users_jgqstm93_.dbf: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/redo/DEMO/controlfile/o1_mf_jgqsvk46_.ctl
ls: cannot access /u01/db/redo/DEMO/controlfile/o1_mf_jgqsvk46_.ctl: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/control/DEMO/controlfile/o1_mf_jgqsvk86_.ctl
ls: cannot access /u01/db/control/DEMO/controlfile/o1_mf_jgqsvk86_.ctl: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/redo/DEMO/onlinelog/o1_mf_3_jgqsvvfo_.log
ls: cannot access /u01/db/redo/DEMO/onlinelog/o1_mf_3_jgqsvvfo_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/control/DEMO/onlinelog/o1_mf_3_jgqsvvh9_.log
ls: cannot access /u01/db/control/DEMO/onlinelog/o1_mf_3_jgqsvvh9_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/redo/DEMO/onlinelog/o1_mf_2_jgqsvrnn_.log
ls: cannot access /u01/db/redo/DEMO/onlinelog/o1_mf_2_jgqsvrnn_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/control/DEMO/onlinelog/o1_mf_2_jgqsvrot_.log
ls: cannot access /u01/db/control/DEMO/onlinelog/o1_mf_2_jgqsvrot_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/redo/DEMO/onlinelog/o1_mf_1_jgqsvnr5_.log
ls: cannot access /u01/db/redo/DEMO/onlinelog/o1_mf_1_jgqsvnr5_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/control/DEMO/onlinelog/o1_mf_1_jgqsvnv0_.log
ls: cannot access /u01/db/control/DEMO/onlinelog/o1_mf_1_jgqsvnv0_.log: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/db/data/DEMO/datafile/o1_mf_temp_jgqsw0qr_.tmp
ls: cannot access /u01/db/data/DEMO/datafile/o1_mf_temp_jgqsw0qr_.tmp: No such file or directory
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/dbs/spfiledemo.ora
ls: cannot access /u01/app/oracle/product/12.1.0.2/db_1/dbs/spfiledemo.ora: No such file or directory
Below files are not deleted. You can manually delete these files or use netca(GUI tool) to delete network files.
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/dbs/orapwdemo
-rw-r----- 1 oracle oinstall 7680 Aug 15 00:48 /u01/app/oracle/product/12.1.0.2/db_1/dbs/orapwdemo
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
-rw-r--r-- 1 oracle oinstall 364 Aug 19 08:25 /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/network/admin/tnsnames.ora
-rw-r--r-- 1 oracle oinstall 178 Aug 15 00:46 /u01/app/oracle/product/12.1.0.2/db_1/network/admin/tnsnames.ora
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/network/admin/sqlnet.ora
-rw-r--r-- 1 oracle oinstall 206 Aug 19 08:38 /u01/app/oracle/product/12.1.0.2/db_1/network/admin/sqlnet.ora
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1/pfile_bkp.ora
-rw-r--r-- 1 oracle oinstall 995 Aug 15 00:17 /u01/app/oracle/product/12.1.0.2/db_1/pfile_bkp.ora
Step 4: Now start ORACLE_HOME software de-installation process.
[oracle@rac1 ~]$ env | grep ORA
ORACLE_SID=demo
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
[oracle@rac1 ~]$ cd /u01/app/oracle/product/12.1.0.2/db_1/deinstall/
[oracle@rac1 deinstall]$
[oracle@rac1 deinstall]$ ls -ltr
total 348
-rw-r--r-- 1 oracle oinstall 401 Feb 10 2012 readme.txt
-rwxr-xr-x 1 oracle oinstall 32334 Jun 7 2013 sshUserSetup.sh
-rwxr-xr-x 1 oracle oinstall 11952 Mar 4 2014 bootstrap.pl
-rw-r--r-- 1 oracle oinstall 8623 Apr 11 2014 deinstall.xml
-rwxr-xr-x 1 oracle oinstall 28591 May 19 2014 deinstall.pl
-rw-r--r-- 1 oracle oinstall 240220 Jul 7 2014 bootstrap_files.lst
drwxr-xr-x 2 oracle oinstall 4096 Jul 12 11:29 response
drwxr-xr-x 2 oracle oinstall 4096 Jul 12 11:29 utl
drwxr-xr-x 2 oracle oinstall 4096 Jul 12 11:29 jlib
-rwxr-xr-x 1 oracle oinstall 10229 Jul 12 11:32 deinstall
[oracle@rac1 deinstall]$
[oracle@rac1 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2021-08-19_00-49-07PM/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/12.1.0.2/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/deinstall2021-08-19_00-49-07PM/logs/netdc_check2021-08-19_12-49-49-PM.log
Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER_DEMO]:LISTENER_DEMO
[oracle@rac1 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2021-08-19_00-49-07PM/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/12.1.0.2/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/deinstall2021-08-19_00-49-07PM/logs/netdc_check2021-08-19_12-49-49-PM.log
Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER_DEMO]:LISTENER_DEMO
Use comma as separator when specifying list of values as input
Specify the list of database names that are configured in this Oracle home [demo]: demo
At least one database from the discovered database list 'demo,' is missing in the specified database list 'demo'. The oracle home will be cleaned up so all databases will not be available after deinstall. If you want to remove a specific database, please use dbca instead. Do you want to continue? [n]: y
###### For Database 'demo' ######
Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [1]: 1
Specify the diagnostic destination location of the database [/u01/app/oracle/diag/rdbms/demo]:
Specify the storage type used by the Database ASM|FS []: FS
Specify the list of directories if any database files exist on a shared file system. If 'demo' subdirectory is found, then it will be deleted. Otherwise, the specified directory will be deleted. Alternatively, you can specify list of database files with full path [ ]:
Specify the fast recovery area location, if it is configured on the file system. If 'demo' subdirectory is found, then it will be deleted. []:
Specify the database spfile location [ ]:
Database Check Configuration END
Oracle Configuration Manager check START
OCM check log file location : /tmp/deinstall2021-08-19_00-49-07PM/logs//ocm_check7885.log
Oracle Configuration Manager check END
######################### DECONFIG CHECK OPERATION END #########################
####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/12.1.0.2/db_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER_DEMO
The following databases were selected for de-configuration : demo
Database unique name : demo
Storage used : FS
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2021-08-19_00-49-07PM/logs/deinstall_deconfig2021-08-19_00-49-48-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-08-19_00-49-07PM/logs/deinstall_deconfig2021-08-19_00-49-48-PM.err'
######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2021-08-19_00-49-07PM/logs/databasedc_clean2021-08-19_01-14-55-PM.log
Database Clean Configuration START demo
This operation may take few minutes.
Database Clean Configuration END demo
Network Configuration clean config START
Network de-configuration trace file location: /tmp/deinstall2021-08-19_00-49-07PM/logs/netdc_clean2021-08-19_01-15-16-PM.log
De-configuring Single Instance listener(s): LISTENER_DEMO
De-configuring listener: LISTENER_DEMO
Stopping listener: LISTENER_DEMO
Warning: Failed to stop listener. Listener may not be running.
Deleting listener: LISTENER_DEMO
Listener deleted successfully.
Listener de-configured successfully.
De-configuring Listener configuration file...
Listener configuration file de-configured successfully.
De-configuring Local Net Service Names configuration file...
Local Net Service Names 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
Oracle Configuration Manager clean START
OCM clean log file location : /tmp/deinstall2021-08-19_00-49-07PM/logs//ocm_clean7885.log
Oracle Configuration Manager clean END
######################### DECONFIG CLEAN OPERATION END #########################
####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : demo
Following Single Instance listener(s) were de-configured successfully: LISTENER_DEMO
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
#######################################################################
############# ORACLE DECONFIG TOOL END #############
Using properties file /tmp/deinstall2021-08-19_00-49-07PM/response/deinstall_2021-08-19_00-49-48-PM.rsp
Location of logs /tmp/deinstall2021-08-19_00-49-07PM/logs/
############ ORACLE DEINSTALL TOOL START ############
####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2021-08-19_00-49-07PM/logs/deinstall_deconfig2021-08-19_00-49-48-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-08-19_00-49-07PM/logs/deinstall_deconfig2021-08-19_00-49-48-PM.err'
######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to rac1
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-08-19_00-49-07PM/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/12.1.0.2/db_1' from the central inventory on the local node : Done
Delete directory '/u01/app/oracle/product/12.1.0.2/db_1' on the local node : Done
Delete directory '/u01/app/oraInventory' on the local node : Done
The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty.
Oracle Universal Installer cleanup was successful.
Oracle Universal Installer clean END
## [START] Oracle install clean ##
Clean install operation removing temporary directory '/tmp/deinstall2021-08-19_00-49-07PM' on node 'rac1'
## [END] Oracle install clean ##
######################### DEINSTALL CLEAN OPERATION END #########################
####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/oracle/product/12.1.0.2/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/12.1.0.2/db_1' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Oracle Universal Installer cleanup was successful.
Run 'rm -r /etc/oraInst.loc' as root on node(s) 'rac1' at the end of the session.
Run 'rm -r /opt/ORCLfmap' as root on node(s) 'rac1' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'rac1' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL TOOL END #############
[oracle@rac1 deinstall]$
You have to manually delete above three files.
[oracle@rac1 ~]$ su -
Password:
[root@rac1 ~]#
[root@rac1 ~]# rm -rf /etc/oraInst.loc
[root@rac1 ~]# rm -rf /opt/ORCLfmap
[root@rac1 ~]# rm -rf /etc/oratab
[root@rac1 ~]#
[root@rac1 ~]# ls -ltr /etc/oraInst.loc
ls: cannot access /etc/oraInst.loc: No such file or directory
[root@rac1 ~]# ls -ltr /opt/ORCLfmap
ls: cannot access /opt/ORCLfmap: No such file or directory
[root@rac1 ~]# ls -ltr /etc/oratab
ls: cannot access /etc/oratab: No such file or directory
[root@rac1 ~]#
You can verify all Oracle Binaries, inventory files, and other files are deleted.
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle
total 0
[oracle@rac1 ~]$
[oracle@rac1 ~]$ ls -ltr /u01/app/oracle/product/12.1.0.2/db_1
ls: cannot access /u01/app/oracle/product/12.1.0.2/db_1: No such file or directory
[oracle@rac1 ~]$
[oracle@rac1 ~]$ ls -ltr /u01/app/oraInventory/
You have successfully dropped Database and de-install Oracle Software.
Thanks for reading this post ! Please comment if you like this post !
Nice
ReplyDelete