zoukankan      html  css  js  c++  java
  • 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> 
  • 相关阅读:
    java jdk 安装后目录下没有 jre
    解决leader-line生成的svg线不能被html2canvas转成图片问题
    css 计数实现目录索引
    前端架构入门
    js 尺寸信息
    阿里云25端口被封,换465端口发送
    appache官网下载 httpClient
    oc基础:类的定义
    指针的地址(地址的地址)
    0 ‘与‘’、 ‘0’
  • 原文地址:https://www.cnblogs.com/abclife/p/4925545.html
Copyright © 2011-2022 走看看