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?
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.
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.
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With