unplugging a PDB

Source: Internet
Author: User

Unplugging a pdbunplugging a PDB is not equal to remove a pdbunplugging a PDB creates a corresponding XML file that can be added to the other cdbpdb after being unplugging by the XML file. It is also shown in V$containers, except that the state creates a directory for mounted, which is used to create the corresponding XML file when unplugging the PDB $mkdir-p/u12/app/oracle/unplug/unplugdb$  Sqlplus '/as sysdba ' sql*plus:release 12.1.0.1.0 Production on Tue June 14:19:54 2015Copyright (c) 1982, Oracle. All rights reserved. Connected to:oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit productionwith The partitioning, OLAP, Adva nced Analytics and Real application testing optionssql> show Con_name;    Con_name------------------------------cdb$rootsql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB                            $SEED Read Only no. 3 YB READ only No 4 YB1 Mounted 5 clonedb READ WRITE NOSQl> alter session set CONTAINER=CLONEDB; Session altered. sql> shutdown immediate; Pluggable Database closed. Sql> conn/as sysdbaconnected.sql> show Con_name;    Con_name------------------------------cdb$rootsql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB                            $SEED Read Only no. 3 YB READ only No 4 YB1 Mounted 5 clonedb mountedsql> alter pluggable database Clonedb unplug in To '/u12/app/oracle/unplug/unplugdb/unplugdb.xml '; Pluggable database altered.    Sql> Select con_id,name,open_mode,restricted from V$pdbs order by 1; con_id NAME open_mode RES-----------------------------------------------------2 PDB                  $SEED READ only NO 3 YB           READ only NO 4 YB1 mounted 5 clonedb mounted Sql> Select Name,open_mode,total_size from V$pdbs;name open_mode total_size-----------------  ---------------------------------Pdb$seed Read Only 283115520YB read Only 393216000YB1 mounted 0CLONEDB mounted 0S Ql> select Pdb_name,status from Dba_pdbs; Pdb_name STATUS---------------------------------------------------------------Y                                                B Normalpdb$seed NORMALYB1 Normalclonedb Unplugged If you want to reuse the PDB, you need to first The PDB is deleted and then re-plug into the CDB sql> drop pluggable database clonedb; Pluggable database dropped. Sql> Select PDb_name,status from Dba_pdbs; Pdb_name STATUS---------------------------------------------------------------Y                                                B Normalpdb$seed NORMALYB1  Normalsql>

Unplugging a PDB

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.