This document describes how fix the "ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only" in 19C CDB/PDB database.
Below are the error details.
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string GOLD
SQL> alter session set container=GOLDPDB;
Session altered.
SQL> select file_name from dba_data_files;
select file_name from dba_data_files
*
ERROR at line 1:
ORA-01219: database or pluggable database not open: queries allowed on fixed
tables or views only
SQL>
Cause: This environment is 19c CDB/PDB environment and we normally observe this error when we bounce the database. After bounce the database, we need to open the pluggable database. Otherwise it will be in mount state.
Solution:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 GOLDPDB MOUNTED
SQL>
SQL> alter session set container=GOLDPDB;
Session altered.
SQL>
SQL> alter pluggable database open;
Pluggable database altered.
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 GOLDPDB READ WRITE NO
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/u02/oradata/GOLD/GOLDpdb/system01.dbf
/u02/oradata/GOLD/GOLDpdb/sysaux01.dbf
/u02/oradata/GOLD/GOLDpdb/undotbs01.dbf
/u02/oradata/GOLD/GOLDpdb/users01.dbf
/u02/oradata/GOLD/GOLDpdb/apex_data01.dbf
SQL>
Thanks for going through the post.................