Oracle

Oracle 12c RAC 中的 PDB 狀態

  • May 14, 2019

安裝了兩個節點 Oracle RAC。在節點 1 上打開 pdb1 並顯示打開模式為讀寫,但在節點 2 上它仍處於掛載狀態?

在節點 1

  rlwrap sqlplus / as sysdba

       SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 14 04:29:47 2019
       Version 19.3.0.0.0

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


       Connected to:
       Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
       Version 19.3.0.0.0

       SQL> show pdbs

           CON_ID CON_NAME                       OPEN MODE  RESTRICTED
       ---------- ------------------------------ ---------- ----------
                2 PDB$SEED                       READ ONLY  NO
                3 PDB1                           READ WRITE NO

       SQL> select CON_ID,DBID,NAME,OPEN_MODE,RESTRICTED from v$pdbs;

       CON_ID        DBID NAME       OPEN_MODE  RES
       ------ ----------- ---------- ---------- ---
            2  1968208496 PDB$SEED   READ ONLY  NO
            3  1212646563 PDB1       READ WRITE NO


SQL> select instance_number,instance_name,instance_mode from v$instance;

INSTANCE_NUMBER INSTANCE_NAME    INSTANCE_MO
--------------- ---------------- -----------
             1 cdbrac1          REGULAR

在節點 2 上

SQL> show pdbs

   CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
        2 PDB$SEED                       READ ONLY  NO
        3 PDB1                           MOUNTED

SQL> select CON_ID,DBID,NAME,OPEN_MODE,RESTRICTED from v$pdbs;

CON_ID            DBID NAME            OPEN_MODE  RES
------ --------------- --------------- ---------- ---
    2      1968208496 PDB$SEED        READ ONLY  NO
    3      1212646563 PDB1            MOUNTED


SQL>  select instance_number,instance_name,instance_mode from v$instance;

INSTANCE_NUMBER INSTANCE_NAME    INSTANCE_MO
--------------- ---------------- -----------
             2 cdbrac2          REGULAR

改變可插拔數據庫

pdb_open::=

在此處輸入圖像描述

實例子句::=

在此處輸入圖像描述

在所有 RAC 實例上打開 PDB:

ALTER PLUGGABLE DATABASE PDB1 OPEN INSTANCES=ALL;

引用自:https://dba.stackexchange.com/questions/238082