zoukankan      html  css  js  c++  java
  • 01 创建PDB的四种方式

    克隆种子容器

    克隆已有的PDB

    插入一个非CDB数据库

    插入一个以前拔出的PDB


    1.克隆种子容器

     
    sqlplus / as sysdba
    alter session set db_create_file_dest='/opt/oradata/';
    create pluggable database pdbdb admin user pdb_dba identified by oracle 
    alter  pluggable database pdbdb open ; 
     
     
     

    2. 克隆已有的PDB

     
    alter pluggable database q2 close ;
    alter pluggable database q2 open read only ;
    
    
    create pluggable database q1 from q2  
        storage unlimited 
        file_name_convert=none ; 
    
    alter  pluggable database q1  open read wirte ;; 
    
    alter pluggable database q2 close ;
    alter pluggable database q2 open read write ; 
     
     

    3. 插入一个非CDB数据库

    注:如果是12c以前的版本,就必须先升级到12c, 或者使用data pump 移动该数据库
     
    alter datbase open read only  ;
    exec dbms_pdb.describe('/home/oracle/to_pdb.xml')
    
    #数据文件拷贝过去
    
    create pluggable database  p1 using '/home/oracle/to_pdb.xml';
    alte session set container=p1 
    @noncdb_to_pdb.sql
    alter pluggable database p1 open read write ; 
     
     
     
     

    4.插入一个以前拔出的PDB

     
    alter pluggable database m1 close ;
    alter pluggable database m1 unplug into '/home/oracle/to_pdb.xml' 
    
    #数据文件拷贝过去
    #drop pluggable database m1 including datafiles ;                     #删除数据库和文件
    #drop pluggable database pdb01 keep datafiles;                        #删除数据库 保存文件
    
    create pluggable database m1 using '/home/oracle/to_pdb.xml' nocopy ;
    alte pluggable database m1 open read wirte ; 
     
     
  • 相关阅读:
    ASP.Net核心对象HttpRequest
    HTTP状态码和常用对照表
    Http协议之Get和Post的区别
    Http协议之Request和Response
    HTTP协议的几个概念
    表单内容提交到数据库案例
    关于表单提交的规则
    HttpHandler简介
    DHCP(五)
    DHCP(四)
  • 原文地址:https://www.cnblogs.com/cqdba/p/b0463926844fc02bcccd13b126ac9551.html
Copyright © 2011-2022 走看看