Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I resolve this "ORA-01109: database not open" error?

Tags:

I'm trying to create my own database using SQLPlus. So first I log into it as admin:

sqlplus sys/sys_password as sysdba 

And then I try to create a new user, called sqlzoo :

CREATE USER sqlzoo IDENTIFIED BY sqlzoo  DEFAULT TABLESPACE tbs_perm_01sqlzoo  TEMPORARY TABLESPACE tbs_perm_01sqlzoo  QUOTA 20M ON tbs_perm_01sqlzoo; 

This gives me the following error :

ERROR at line 1: ORA-01109: database not open 

Why is it giving me such an error?

like image 980
Caffeinated Avatar asked Dec 03 '14 19:12

Caffeinated


People also ask

How can I tell if Oracle database is open?

Use the below command to check the status and other names of the oracle databases 19c and 21c. SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE; In the below output, you can see that database status is active which means the database is ready to use.

How do I open a database in Mount state?

To open a mounted database, use the ALTER DATABASE statement with the OPEN clause: ALTER DATABASE OPEN; After executing this statement, any valid Oracle Database user with the CREATE SESSION system privilege can connect to the database.


1 Answers

As the error states - the database is not open - it was previously shut down, and someone left it in the middle of the startup process. They may either be intentional, or unintentional (i.e., it was supposed to be open, but failed to do so).

Assuming that's nothing wrong with the database itself, you could open it with a simple statement:(Since the question is asked specifically in the context of SQLPlus, kindly remember to put a statement terminator(Semicolon) at the end mandatorily, otherwise, it will result in an error.)

ALTER DATABASE OPEN; 
like image 113
Mureinik Avatar answered Nov 01 '22 01:11

Mureinik