As a DBA, you must have come
across the below error while working on pluggable databases
ERROR at line 1:
ORA-01219: database or pluggable database not
open: queries allowed on fixed
tables or views only
Generally, this error gets reported whenever you try to access a view or a table in the pluggable database which is not in the open state, Here I was trying to check users in the database and was hit with this error, then I checked the status of my pluggable database and I found it was in mount state and not in the open state.
Then immediately I opened the database using the below command and then I was able to query the table,
SQL>
alter pluggable database open;
Pluggable
database altered.
SQL>
show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
----------
------------------------------ ---------- ----------
         3 TECHNOPDB                      READ WRITE NO
SQL>  select count (*) from dba_users;
  COUNT(*)
----------
        40
SQL>
 
