Thursday, December 28, 2017

ORA-01586: database must be mounted EXCLUSIVE and not open for this operation

As this message clearly explains, this error means that the operation you are going to perform that returned this error, needs database to be mounted EXCLUSIVELY - by only one instance. In my case, I was trying to drop a RAC database when I faced ORA-01586. I realized that the other instance of my RAC database is still up and it is needed that all the instances of a RAC database should be down before we can drop a database.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup restrict mount
ORACLE instance started.

Total System Global Area 2.5655E+10 bytes
Fixed Size                  2265224 bytes
Variable Size            1.3489E+10 bytes
Database Buffers         1.2147E+10 bytes
Redo Buffers               16896000 bytes
Database mounted.
SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string       mydb
SQL> drop database
  2  ;
drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation

SQL>

Shutting down the remaining instance and then re-execution of DROP DATABASE command worked for me, and database was dropped successfully. You may face same error during some other command execution, and in case of a RAC database, you should make sure that only one instance is up and running where you are executing your respective command.

No comments:

Post a Comment

Popular Posts - All Times