Oracle: ORA-01219 database or pluggable database not open only allows queries on fixed tables or views

describe

An error was reported when connecting to the Oracle database. I fumbled for a long time in the solution provided by Du Niang, and finally got a set of operations that can solve the problem in my environment. Because it was not solved by referring to a certain blog, I will record my personal solution. operate.

solution

First "Win + R", enter "cmd" to open the command line:
open command line
Then copy and paste the following commands in the command line (directly copy and paste the entire command, it will be executed automatically):

sqlplus/nolog
connect / as sysdba
select open_mode from v$database;
alter database open;
select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
alter pluggable database orclpdb open;
alter session set container=orclpdb;

command execution record
Then you can connect to the database normally!

Emm... So far, this miscellaneous fish has not carefully pondered the root cause of this error and why ☝ can connect to the database normally after one operation. . Anyway, let’s remember it first~

reference documents

[1] Solution reference link 1
[2] Solution reference link 2

Guess you like

Origin blog.csdn.net/qq_36604536/article/details/129375187