• Home
  • About
  • Log In
  • Register
Follow Us
KTEXPERTS
  • Oracle DBA
    • Oracle 12C New Features
      • Oracle Multitenant Features
      • Non Container Features
    • Oracle Architecture
      • Oracle Server Architecture
      • Oracle Background Processes
      • Oracle Pyhisical Database
      • Select and Update Statement
      • Startup and Shutdown Modes
      • Redolog File Management
      • User Management
        • RMAN (Recovery Manager)
        • Oracle Production Support Scripts
    • Oracle Tablespace Management
    • Oracle Datapump (Exports & Imports)
    • Performance Tuning
    • Oracle Dataguard
    • Oracle ASM
    • Oracle Auditing
    • Oracle Partitioning
    • SecureCRT
    • Partitions/Shell Script
  • Oracle RAC
    • Introduction to Oracle RAC
    • 11gR2 RAC Installation
    • 12cR2 RAC Installation
    • 19c RAC Installation
    • Flashback Restore on Two Node RAC Servers
  • GoldenGate
    • Oracle to Oracle GoldenGate Unidirectional Replication
    • MySQL to Oracle Heterogeneous Replication
    • Oracle to MySQL Heterogeneous Replication
    • CredentialStore in Goldengate
    • GoldenGate Monitoring Commands
    • Usage of HandleCollisions and No HandleCollisions
    • Goldengate subdirs
    • Enable/Disable DDL replication
    • Data Selection & Filtering
    • Automation scripts in Goldengate
    • Logdump utility
    • Initial loads with GoldenGate
    • IgnoreDelete and IgnoreUpdate parameters in GG
    • COLS & COLSEXCEPT FILTER in GG
    • Add new table to existing GoldenGate Replication
      • Cassandra
  • AWS
    • EC2 (Elastic Compute Cloud)
    • S3 (Simple Storage Service)
    • IAM (Identity and Access Management)
    • CloudWatch
    • VPC (Virtual Private Cloud)
    • Route 53
    • RDS
    • Dynamo DB
    • EFS (Elastic File System)
    • Cloud Trail
    • Cloud Front
    • SNS (Simple Notification Service)
    • SQS (Simple Queue Service)
    • SES (Simple Email Service)
    • Redshift
    • Elastic Cache
    • Snowball
  • SQL Server
  • DevOps
    • LINUX
    • GIT
    • Chef
    • Ansible
    • Docker
    • Maven
  • MySQL
    • MySQL Installation & Upgrade
    • MySQL DBA
    • Difference Between Oracle and MySQL
  • PostgreSQL
    • Installation of PostgreSQL
    • WAL Internals in PostgreSQL
    • Replication to GCP PostgreSQL
    • Level of Work in Postgres Database
    • Data Fragmentation in PostgreSQL
    • PostgreSQL Interview Q&A
    • PostgreSQL Commands
  • Authors
    • Authors
    • Speakers
    • Volunteers
  • INDEX
    • Oracle DBA
      • Performance Tuning
      • Oracle RAC
      • Oracle 12c New Features
      • Oracle Production Support Scripts
      • Oracle DataGuard
      • Data Pump (Export & Import)
      • Oracle 18c
      • RMAN (Recovery Manager)
      • Oracle Tablespaces
      • Oracle ASM
      • Oracle Partitioning
      • Oracle Architecture
    • PostgreSQL
    • AWS
    • DevOps
    • GoldenGate
    • Cassandra
    • SQL Server
    • Oracle RAC
    • MySQL
    • SecureCRT
  • Webinar Recordings
  • Daily Tips
    • Oracle DBA Tips
    • GoldenGate Tips
    • MySQL Tips
    • SQL Server Tips
    • PostgreSQL Tips
    • MongoDB Tips
    • DevOps Tips
    • Python Tips
    • Data Science Tips
      • Exadata Tips
    • AWS Tips
    • .NET Tips
    • Linux Tips
  • Azure
  • Python
  • MongoDB
mm

Binnary Ajay Kumar

This is Binnary Ajay Kumar having around 4+ years of experience as Oracle DBA having exposure to SQL,PL*SQL, RAC,Dataguard, RMAN,GoldenGate,MySQL DBA and Amazon Web Services. Share your knowledge. It’s a way to achieve immortality.

Follow

Share this post

Tags

  • drop database
  • drop datbaase in rac
  • ktexperts

How to drop a Oracle RAC database manually

Posted on July 4, 2021 in Oracle Architecture, Oracle DB Admin, Oracle Metadata, RAC
Share via:
Post Views: 0

How to drop a two-node Oracle RAC database database manually.

In this article, we wrote an Clear steps for dropping a two node oracle database with Pre-requisite steps.

Server: sewnpossqa01/02
Database : npossqa1
DB Unique name:  sewnpossqa1

Step 1: 

 Take consistent export of NPOSSQA1 database before dropping the database.

1
nohup expdp "'/ as sysdba'" directory=DBA_EXPORT dumpfile=expdp_NPOSSQA1_bfr_DB_DROP_date '+%m%d%y_%H%M%S'`_%U.dmp  logfile=expdp_NPOSSQA1_bfr_DB_DROP_date '+%m%d%y_%H%M%S'`_%U.log EXCLUDE=STATISTICS flashback_time=systimestamp cluster=n metrics=Y parallel=4 &

Step 2:

Take pfile backup

1
create pfile='/u01/app/oracle/datapump/npossqa1_pfile_bfr_db_drop_04JUL2021.ora' from spfile;

Step 3:

Run the Prechecks scripts

1
2
3
4
5
6
7
8
9
. oraenv
npossqa1
sqlplus / as sysdba
 
spool /u01/app/oracle/datapump/npossqa1/npossqa1_db_files_details.txt
select name from v$datafile;
select name from v$controlfile;
select member from v$logfile;
spool off

Step 4:

To avoid the alerts to email we need to  disable the cronjobs in both the nodes related to database which we are going to drop.

Step 5:

Connect to database and set cluster_database=false

1
2
3
4
5
6
sqlplus / as sysdba
select name from v$database; --> make sure it is the correct database to drop
NAME
------
NPOSSQA1
alter system set cluster_database=FALSE scope=spfile sid='*';

Step 6: 

Check the status, configuration of  of database and shutdown the database

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[oracle@sewnpossqa ~]$srvctl status database -d sewnpossqa1
Instance seprpst11 is running on node tewupdtrps01
Instance seprpst12 is running on node tewupdtrps02
 
[oracle@sewnpossqa ~]$ srvctl config database -d sewnpossqa1
Database unique name: npossqa1
Database name: sewnpossqa1
Oracle home: /u01/app/oracle/product/12102
Oracle user: oracle
Spfile: +DATA01/npossqa1/PARAMETERFILE/spfile.445.1029255429
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA01,REDO01,REDO02
Mount point paths:
Services:
Type: SINGLE
OSDBA group: oinstall
OSOPER group: oinstall
Database instance: npossqa1
Configured nodes: sewnpossqa01
Database is administrator managed

Shutdown the database :

1
2
3
4
5
[oracle@sewnpossqa ~]$ srvctl stop database -d sewnpossqa1
 
Check the status
 
[oracle@sewnpossqa ~]$ srvctl status database -d sewnpossqa1

Step 7:

Connect to sqlplus and start the database in  exclusive restrict mount state.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[oracle@sewnpossqa ~]$ sqlplus / as sysdba
 
SQL> startup mount exclusive restrict;
Total System Global Area 1.0737E+11 bytes
Fixed Size 6085288 bytes
Variable Size 1.9864E+10 bytes
Database Buffers 8.7242E+10 bytes
Redo Buffers 262348800 bytes
Database mounted.
 
SQL> select logins,parallel from gv$instance;
LOGINS PAR
---------- ---
RESTRICTED NO

Step 8: 

1
2
SQL> drop database;
Database dropped.

Step 7: 

Remove the database entry from cluster:

1
2
3
srvctl config database -d sewnpossqa1
srvctl remove database -d sewnpossqa1
srvctl config database -d sewnpossqa1

Post Steps: 

1
2
3
4
5
1) Cross verify if all the associated datafiles, comntrolfile and online redologs are removed
2) Remove the directories if not required like archivelog directories etc.
3) Remove the entry of the database from /etc/oratab
4) Modify/drop any of the scripts used for this database in crontab
5) crosscheck and cleanup all the old dumps or any log files

Note : Please perform all the above steps in your own servers.

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

You might also like...

  • Automating OSWatcher Log Capture with oswlogs_capture.sh

    Automating OSWatcher Log Capture with oswlogs_capture.sh

  • Table/index movement using pl/sql procedure

    Table/index movement using pl/sql procedure

  • Datapump export and import from Source PDB to Target PDB

    Datapump export and import from Source PDB to Target PDB

Previous Post: AWS : Real Time Use Case On Storage
Next Post: How to Install Oracle VM Virtual Box On Windows

Add Comment Cancel reply

Recent Comments

  • Krishna on Installation of Oracle Linux In windows
  • Binnary Ajay Kumar on How to move or rename Oracle Home
  • Prabhu on How to move or rename Oracle Home
  • Krishna on Protected: How to kill Long Running Query using scripts.
  • krishna on Linux Basic Commands for DevOps (PART-2)

Categories

Ad

Started ktexperts.com with a small hope of sharing knowledge, And today we can proudly say that ktexperts.com is being accessed from all corners of the world. Here’s a glimpse of our growth.

About KTEXPERTS

KT Experts is one enthusiastic knowledge-sharing platform. The platform concentrates on all Database Technologies like Oracle Database Administration(DBA), Oracle RAC, Oracle GoldenGate, MySQL, SQL Server Database Administration, Cassandra, AWS and DevOps.

This page consists of all the well-developed articles  of the Technologies. This is an effort of many dedicated professionals for a better IT world.

We have received the best reviews over time and the usage of this page has been increasingly drastic. So why wait? Let’s get started!!!

Thank you 

Follow Our Social Networking Sites

Recent Posts

  • Automating OSWatcher Log Capture with oswlogs_capture.sh

    Automating OSWatcher Log Capture with oswlogs_capture.sh

  • COMPRESSION IN CASSANDRA

    COMPRESSION IN CASSANDRA

  • INSTALLING CASSANDRA USING DEBIAN PACKAGES

    INSTALLING CASSANDRA USING DEBIAN PACKAGES

  • OBJECT ORIENTED PROGRAMMING IN PYTHON

    OBJECT ORIENTED PROGRAMMING IN PYTHON

  • CASSANDRA INSTALLATION USING

    CASSANDRA INSTALLATION USING

Our Partners

Website Visitors


Locations of visitors to this page

COPYRIGHT © 2017 - KTEXPERTS.COM Back To Top
sponsored