oracle中出现ORA-65085错误怎么办
admin
2023-05-06 20:42:10
0

SQL> show con_name

CON_NAME

------------------------------

CDB$ROOT

SQL> show pdbs

    CON_ID CON_NAME  OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED  READ ONLY  NO

3 PDB  READ WRITE NO

4 TEST  MOUNTED

SQL> show con_name

CON_NAME

------------------------------

CDB$ROOT

SQL> alter pluggable database test open read only;

alter pluggable database test open read only

*

ERROR at line 1:

ORA-65085: cannot open pluggable database in read-only mode

SQL> col pdb_name for a20

SQL> col status for a40

SQL> select pdb_name,status from dba_pdbs;

PDB_NAME     STATUS

-------------------- ----------------------------------------

PDB     NORMAL

PDB$SEED     NORMAL

TEST     NEW

pdb的status有NEW、NORMAL、UNPLUGGED、NEEDS UPGRADE、CONVERTING、UNUSABLE几种状态,对这几种状态的解释如下:

NEW - The PDB has never been opened since it was created. It must be opened in READ WRITE mode for Oracle to perform processing needed to complete the integration of the PDB into the CDB and mark it NORMAL. An error will be thrown if an attempt is made to open the PDB read only.

NORMAL - The PDB is ready to be used.

UNPLUGGED - The PDB has been unplugged. The only operation that can be performed on it is DROP PLUGGABLE DATABASE.

NEEDS UPGRADE - A PDB needs to be upgraded to the version of the CDB into which it was plugged.

CONVERTING - A non-CDB was plugged into the CDB and is undergoing conversion required to make it behave like a real PDB.

UNUSABLE - The PDB is being created or an unrecoverable error was encountered during its creation. The PDB cannot be opened while its state is set to UNUSABLE. If the PDB remains in this state because of an error encountered during its creation, it can only be dropped. The alert log can be checked to determine if there was an error 

during PDB creation.

通过上面对status几种状态的说明,对属于NEW的pdb,需要先open。

SQL> alter pluggable database test open;

再对数据库操作open read only操作:

[oracle@ora12c ~]$ sqlplus sys/oracle@192.168.10.31:1521/test as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue Dec 1 09:53:23 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show pdbs

    CON_ID CON_NAME  OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

4 TEST  READ WRITE NO

SQL> shutdown immediate;

Pluggable Database closed.

SQL> alter database open read only;

Database altered.

SQL> show pdbs

    CON_ID CON_NAME  OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

4 TEST  READ ONLY  NO

相关内容

热门资讯

江苏睿恩新能源申请正极极片及其... 国家知识产权局信息显示,江苏睿恩新能源科技有限公司申请一项名为“一种正极极片及其制备方法、锂离子电池...
流言|2026年地球会失重7秒... 流言:2026年8月12日地球将失重7秒、数千万人因此伤亡。 (图片由AI生成) 真相:“地球重...
从渠道赋能到行业基础设施 互联... 2025年,伴随数智技术的加速渗透,保险业的获客方式、决策逻辑乃至服务形态,都在被重新定义,互联网保...
人形机器人绕不开的坎:续航问题... 这两年,关于人形机器人的故事已经被讲了很多:AGI 的终极载体、万亿美元的劳动力替代、工厂和家庭的全...
合成生命重要突破 中国团队首次... 中新网北京5月13日电 (记者 孙自法)构建能够模拟天然细胞分裂行为的人工细胞,是合成生命研究至关重...
“九章四号”问世 中国科学家再... 4月10日拍摄的“九章四号”量子计算原型机局部。新华社记者 周牧 摄 新华社合肥5月13日电(记者陈...
索尼正面回应30%平台税:要养... 快科技5月13日消息,针对长期诟病的PlayStation商店30%抽成,索尼官方近日首度正面回应称...
具身跃迁 生态共建 中国移动首... 5月13日,中国移动首届具身智能合作伙伴大会在杭州举行。大会以“数智具身 移路领航”为主题,以搭建政...
“爱泼斯坦被软禁时,性侵了我” 据英国广播公司BBC报道,一名曾遭受杰弗里·爱泼斯坦性侵的幸存者讲述了这位已故性侵犯者,在因引诱未成...
凤凰女记者战地日记丨一边装行李... 今天早上起来一睁眼,就看看伊朗的局势。美伊昨晚在波斯湾又发生了零星冲突,凌晨12点伊朗说靠近格什姆岛...