Oracle 12c Multi-tenancy Plug a pdb,unplugging a PDB in CDB

Source: Internet
Author: User

The multi-tenancy option, introduced in Oracle database, allows a single container database (CDB) to host multiple separate pluggable databases (PDB).
This article simply demonstrates how to Plug a pdb,unplugging a PDB operation in CDB.


One, plugged PDB into Unplugged PDB
Sql> Show PDBs
con_id con_name OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 Pdb$seed READ only NO
3 PDB01 READ WRITE NO
Sql>alter Pluggable database pdb01 close immediate;
Sql>alter Pluggable database Pdb01 unplug into '/home/oracle/pdb01.xml ';
[Email protected] ~]$ pwd
/home/oracle
[email protected] ~]$ ll Pdb01.xml
-rw-r--r--. 1 Oracle Oinstall 7758 May 7 05:09 Pdb01.xml
[email protected] ~]$ cat Pdb01.xml
<?xml version= "1.0" encoding= "UTF-8"?>
<PDB>
<xmlversion>1</xmlversion>
<pdbname>PDB01</pdbname>
<cid>3</cid>
<byteorder>1</byteorder>
<vsn>203424000</vsn>
<vsns>
<vsnnum>12.2.0.1.0</vsnnum>
<cdbcompt>12.2.0.0.0</cdbcompt>
<pdbcompt>12.2.0.0.0</pdbcompt>
<vsnlibnum>0.0.0.0.24</vsnlibnum>
<vsnsql>24</vsnsql>
<vsnbsv>8.0.0.0.0</vsnbsv>
</vsns>
<dbid>2550500229</dbid>
... Omitted
Sql> Show PDBs
con_id con_name OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 Pdb$seed READ only NO
3 PDB01 Mounted
sql> Drop pluggable database pdb01 keep datafiles;
Pluggable database dropped.
Sql> Show PDBs
con_id con_name OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 Pdb$seed READ only NO


Second, Plug Unplugged PDB into CDB

Sql> SELECT name,cdb from V$database;
NAME CDB
--------- ---
ANDYCDB YES
Sql> Create pluggable database pdb01 using '/home/oracle/pdb01.xml ';
Pluggable database created.
Sql> Show PDBs
con_id con_name OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 Pdb$seed READ only NO
3 PDB01 Mounted
sql> Alter pluggable database PDB01 open;
Pluggable database altered.
Sql> Show PDBs
con_id con_name OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 Pdb$seed READ only NO
3 PDB01 READ WRITE NO

Oracle 12c Multi-tenancy Plug a pdb,unplugging a PDB in CDB

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.