Database Reference
In-Depth Information
will demonstrate. It does not matter if the new PDB is created from a clone of an existing PDB or as a clone of the seed
PDB. The example assumes that you are familiar with creating a PDB from SQL*Plus, please refer back to Chapter 7 for
a refresher on the syntax.
SQL> create pluggable database pdb4
2 admin user PDB4_DBA identified by secretPassword
3 file_name_convert=('/u01/oradata/CDBFSDCA/pdbseed','/u01/oradata/CDBFSDCA/PDB4');
The above example is the most basic example possible where the CDB resides on a file system. Prior to executing
the above command you will need to ensure that the directories referenced in the file name conversion clause exist. In
addition you will need to have db_file_name_convert defined on the standby database to translate the full path. The
final parameter that comes to mind regarding data file creation is standby_file_management which should always be
set to auto in any Data Guard configuration.
The standby database acknowledges the creation of the PDB in the alert.log:
2013-09-17 11:34:42.864000 +01:00
Recovery copied files for tablespace SYSTEM
Recovery successfully copied file /u01/oradata/CDBFSDCB/PDB4/system01.dbf from
/u01/oradata/CDBFSDCB/pdbseed/system01.dbf
Recovery created file /u01/oradata/CDBFSDCB/PDB4/system01.dbf
Datafile 21 added to flashback set
Successfully added datafile 21 to media recovery
Datafile #21: '/u01/oradata/CDBFSDCB/PDB4/system01.dbf'
2013-09-17 11:34:52.038000 +01:00
Recovery copied files for tablespace SYSAUX
Recovery successfully copied file /u01/oradata/CDBFSDCB/PDB4/sysaux01.dbf from
/u01/oradata/CDBFSDCB/pdbseed/sysaux01.dbf
Recovery created file /u01/oradata/CDBFSDCB/PDB4/sysaux01.dbf
Datafile 22 added to flashback set
Successfully added datafile 22 to media recovery
Datafile #22: '/u01/oradata/CDBFSDCB/PDB4/sysaux01.dbf'
Querying the V$PDBS view you can also see that it has been created.
The effect of plugging in PDBs into the primary
Plugging in a previously unknown PDB is very similar to plugging in a transportable tablespace data set into the
primary database but easier. This Transportable Tablespace scenario is well known for quite some time and has been
documented in the Data Guard Concepts and Administration Guide section 10.3.3 in the 12c documentation set.
The basic tasks for plugging in a PDB are almost the same. First you need to make the PDB files available to
the primary and standby databases. In this example the DBA has been instructed to plug in PDB5 into the primary
database CDBFSDCA for which there is a single standby database CDBFSDCB. The file system based case has
deliberately been chosen over ASM and OMF as it requires a little more attention to detail. As part of the clone process
the DBA has made the files available in the default location on the primary and standby database(s).
[oracle@server1 CDBFSDCA]$ ls -l PDB5
total 875548
-rw-r-----. 1 oracle asmadmin 5251072 Sep 17 12:12 PDB5_users01.dbf
-rw-r-----. 1 oracle asmadmin 618668032 Sep 17 12:12 sysaux01.dbf
-rw-r-----. 1 oracle asmadmin 272637952 Sep 17 12:12 system01.dbf
[oracle@server1 CDBFSDCA]$
 
Search WWH ::




Custom Search