zoukankan      html  css  js  c++  java
  • 番外:克隆本地PDB中其他参数和子句的说明

    基于版本:19c (12.2.0.3) AskScuti

    创建方法:克隆本地PDB(从本地其他PDB创建新的PDB)

    对应路径:Creating a PDB --> Cloning --> Locally

    具体请参考《在多租户(容器)数据库中如何创建PDB:方法2

    1. 内容总览

    2. 设置 PDB_FILE_NAME_CONVERT

    3. 使用 FILE_NAME_CONVERT 本地克隆

    4. 使用 CREATE_FILE_DEST 本地克隆

    1. 内容总览

    接--克隆本地PDB一文中的其他参数设置。

    2. 设置 PDB_FILE_NAME_CONVERT

    SQL> !mkdir /u01/app/oracle/oradata/CDB1/pdb3
    
    SQL> show parameter pdb_file
    
    SQL> alter system set pdb_file_name_convert='/u01/app/oracle/oradata/CDB1/pdb1','/u01/app/oracle/oradata/CDB1/pdb3';
    
    System altered.

    创建PDB3

    SQL> alter pluggable database pdb1 close;
    
    Pluggable database altered.
    
    SQL> alter pluggable database pdb1 open read only;
    
    Pluggable database altered.
    
    SQL> create pluggable database pdb3 from pdb1;
    
    Pluggable database created.
    
    SQL> show pdbs
    
        CON_ID CON_NAME  OPEN MODE  RESTRICTED
    ---------- --------- ---------- ----------
         2 PDB$SEED      READ ONLY  NO
         3 PDB1          READ ONLY  NO
         4 PDB2          READ WRITE NO
         5 PDB3          MOUNTED

    开启PDB3

    SQL> alter pluggable database pdb3 open;
    
    Pluggable database altered.

    3. 使用 FILE_NAME_CONVERT 本地克隆

    使用 FILE_NAME_CONVERT 子句创建

    SQL> !mkdir /u01/app/oracle/oradata/CDB1/pdb4
    
    SQL> create pluggable database pdb4 from pdb1 file_name_convert=('/u01/app/oracle/oradata/CDB1/pdb1','/u01/app/oracle/oradata/CDB1/pdb4');
    
    Pluggable database created.

    注意:被克隆的PDB1要处于只读状态。

    SQL> alter pluggable database pdb4 open;
    
    Pluggable database altered.
    
    SQL> show pdbs
    
        CON_ID CON_NAME  OPEN MODE  RESTRICTED
    ---------- --------- ---------- ----------
         2 PDB$SEED      READ ONLY  NO
         3 PDB1          READ ONLY  NO
         4 PDB2          READ WRITE NO
         5 PDB3          READ WRITE NO
         6 PDB4          READ WRITE NO

    4. 使用 CREATE_FILE_DEST 本地克隆

    使用 CREATE_FILE_DEST 子句创建

    SQL> !mkdir /u01/app/oracle/oradata/CDB1/pdb5
    
    SQL> create pluggable database pdb5 from pdb1 create_file_dest='/u01/app/oracle/oradata/CDB1/pdb5';
    
    Pluggable database created.

    注意:被克隆的PDB1要处于只读状态。

    SQL> alter pluggable database pdb5 open;
    
    Pluggable database altered.
    
    SQL> show pdbs
    
        CON_ID CON_NAME  OPEN MODE  RESTRICTED
    ---------- --------- ---------- ----------
         2 PDB$SEED      READ ONLY  NO
         3 PDB1          READ ONLY  NO
         4 PDB2          READ WRITE NO
         5 PDB3          READ WRITE NO
         6 PDB4          READ WRITE NO
         7 PDB5          READ WRITE NO
  • 相关阅读:
    EF 关系规则(一对一、一对多、多对多...)
    EF框架中加子类后出现列名 'Discriminator' 无效问题
    .net下Ueditor配置(主要讲解上传功能配置)
    同构数查找程序的优化过程 Anthony
    Effective STL 条款17 Anthony
    C 语言中的数组类型和数组指针类型. Anthony
    Effective STL 条款18 Anthony
    RDLC之自定義數據集二
    给Calendar添加标签
    Profile学习
  • 原文地址:https://www.cnblogs.com/askscuti/p/11338580.html
Copyright © 2011-2022 走看看