• Oracle 12C -- plug unplugged PDB into CDB


    connetct to CDB as a common user and verify that pdb_test is closed

    SQL> select con_id,dbid,name,open_mode from v$pdbs;
    
        CON_ID       DBID NAME                           OPEN_MODE
    ---------- ---------- ------------------------------ ----------
             2 1258043702 PDB$SEED                       READ ONLY
             3 3749525766 PDB1                           READ ONLY
             4 2192587015 P4                             READ ONLY
             5  255759235 PDB_TEST                       READ WRITE
    
    SQL> alter pluggable database pdb_test close;
    SQL> alter pluggable database pdb_test unplug into '/tmp/xmlfile1.xml';
    SQL> select con_id,dbid,name,open_mode from v$pdbs;
    
        CON_ID       DBID NAME                           OPEN_MODE
    ---------- ---------- ------------------------------ ----------
             2 1258043702 PDB$SEED                       READ ONLY
             3 3749525766 PDB1                           READ ONLY
             4 2192587015 P4                             READ ONLY
             5  255759235 PDB_TEST                       MOUNTED

    A PDB must be dropped from the CDB before it can be plugged back into the same CDB

    SQL> create pluggable database pdb_test using '/tmp/xmlfile1.xml' nocopy;
    create pluggable database pdb_test using '/tmp/xmlfile1.xml' nocopy
    *
    ERROR at line 1:
    ORA-65012: Pluggable database PDB_TEST already exists.
    
    
    SQL> drop pluggable database pdb_test;
    SQL> create pluggable database pdb_test using '/tmp/xmlfile1.xml' nocopy;
    SQL> select con_id,dbid,name,open_mode from v$pdbs;
    
        CON_ID       DBID NAME                           OPEN_MODE
    ---------- ---------- ------------------------------ ----------
             2 1258043702 PDB$SEED                       READ ONLY
             3 3749525766 PDB1                           READ ONLY
             4 2192587015 P4                             READ ONLY
             5  255759235 PDB_TEST                       MOUNTED
    
    SQL> alter pluggable database pdb_test open;
    SQL> select con_id,dbid,name,open_mode from v$pdbs;
    
        CON_ID       DBID NAME                           OPEN_MODE
    ---------- ---------- ------------------------------ ----------
             2 1258043702 PDB$SEED                       READ ONLY
             3 3749525766 PDB1                           READ ONLY
             4 2192587015 P4                             READ ONLY
             5  255759235 PDB_TEST                       READ WRITE
    
    SQL> 
  • 相关阅读:
    MYSQL索引
    MYSQL 外键 on语句 多表查询
    MYSQL用户管理
    MYSQL数据类型 表基本操作 表记录增删改 单表查询
    JQuery 引用方式
    JQuery 元素操作 each循环
    Android EditText方框验证码 短信验证码攻略
    android MVP模式介绍与实战
    一些不错的Android开源音视频播放器
    Android可伸缩布局-FlexboxLayout(支持RecyclerView集成)
  • 原文地址:https://www.cnblogs.com/abclife/p/4925545.html
Copyright © 2020-2023  润新知