Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-01219: database not open: queries allowed on fixed tables/views only

I Am using oracle 11g and SQL developer tool. When i tried to retrieve rows from db i am getting error message as :-

ORA-01219: database not open: queries allowed on fixed tables/views only)

I looked for sgadef.dbf file and it was missing in home directory.. Can someone help me to make it working.

like image 908
Devoloper250 Avatar asked Apr 08 '14 14:04

Devoloper250


People also ask

How do I fix my ORA 01219?

ORA-01219 means that the data dictionary is not allowable to be queried at MOUNT state. To solve the error, you should do either of the following ways: Open the database from MOUNT state, then query it again. Query the dynamic dictionaries V$TABLESPACE instead, which is allowable to be queried at mount state.

How do I resolve ORA 16000 database open for read only?

To resolve this issue, involve the DBA and make the databases to Read-Write mode instead of Read-only so that the users will able to connect and fetch data.

How do I fix Ora 01507 database not mounted?

To solve ORA-01507, you need to open it to MOUNT state. SQL> alter database mount; Database altered. Then issue your RMAN commands again.

How do I open a database in Mount state?

Opening a Closed Database 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.


2 Answers

First of all check the status of the instance you work with (this may need to connect under administrator account):

select status from v$instance;

Probably you will get

STATUS
------------
MOUNTED

Under sys account try to complete

ALTER DATABASE OPEN;

and check that it's completed successfuly. If not - please share the result of output and alert log in your question.

like image 107
Dmitry Nikiforov Avatar answered Sep 21 '22 05:09

Dmitry Nikiforov


If the problem is related to a pluggable database then you can do the following:

  1. Check the status of the PDB
> SELECT name, open_mode FROM v$pdbs ORDER BY name;

NAME      OPEN_MODE
-------------------
ORCLPDB   MOUNTED
  1. Change the status to OPEN if it is not (like MOUNTED for example)

ALTER PLUGGABLE DATABASE orclpdb OPEN READ WRITE;

like image 28
Marcell Avatar answered Sep 17 '22 05:09

Marcell