
Se você obteve o erro “ORA-01586: database must be mounted EXCLUSIVE and not open for this operation” após uma tentativa de apagar seu banco “drop database;”, este post pode te ajudar. Provavelmente este banco que você está tentando apagar é um Oracle RAC, acertei? Se sim, continue lendo…
Coloquei o banco no estado mounted e habilitei o modo restrito. No entanto, após tentar apagar o banco, eis que resulta em um “ORA-01586: database must be mounted EXCLUSIVE and not open for this operation” , como se pode ver abaixo:
SQL> startup mount ORACLE instance started. Total System Global Area 2137886720 bytes Fixed Size 2248080 bytes Variable Size 1660945008 bytes Database Buffers 469762048 bytes Redo Buffers 4931584 bytes Database mounted. SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; System altered. SQL> select instance_name, status from v$instance; INSTANCE_NAME STATUS ---------------- ------------ ORCL MOUNTED SQL> drop database; drop database * ERROR at line 1: ORA-01586: database must be mounted EXCLUSIVE and not open for this operation
Para resolver o problema, vamos seguir os seguintes passos:
- Alterar o parâmetro cluster_database para FALSE no spfile:
SQL> show parameters cluster_database NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean TRUE cluster_database_instances integer 2 SQL> alter system set cluster_database=FALSE scope=spfile; System altered.
- Efetuar o stop da instância no NODE 2. (Se tiver mais de 2 nós, efetue o stop dos demais e só deixe o nó 1 ativo):
oracle@ /oracle/app/oracle/product/11.2.0.4/bin $ ./srvctl stop instance -d ORCL -i ORCL2 -o immediate
- Verificar o status das instâncias: (Somente o NODE 1 deve estar no ar):
oracle@ /oracle/app/oracle/product/11.2.0.4/bin $ ./srvctl status database -d ORCL Instance ORCL1 is running on node tech01 Instance ORCL2 is not running on node tech02
- No NODE 1, efetuar o stop e o startup no estado mount e, posteriormente habilitar o modo restrito:
SQL> shutdown immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 2137886720 bytes Fixed Size 2248080 bytes Variable Size 1610613360 bytes Database Buffers 520093696 bytes Redo Buffers 4931584 bytes Database mounted. SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; System altered. SQL> select instance_name, status from gv$instance; INSTANCE_NAME STATUS ---------------- ------------ ORCL1 MOUNTED
- Verificar as alterações refletidas após o stop/start da base de dados:
SQL> show parameters cluster_database NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean FALSE cluster_database_instances integer 1
- Apagar a base de dados:
SQL> drop database; Database dropped. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL>


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.