Database Reference
In-Depth Information
The CDB contains a great deal of critical information about the CDB itself and all of the
PDBs that are plugged into the CDB. Because of the information contained in the CDB, it
must be backed up just like any other Oracle database, even though you don't store objects
there. Restoring the CDB is not like restoring a lost control file. You can't simply restore it
by issuing a SQL statement. You have to do a physical database restore.
When you create an Oracle multitenant database, you are creating the CDB as well as
some PDBs. Now that we have discussed the CDB, let's look at the PDBs and what they do.
Oracle Multitenant PDB
The Oracle PDB (also called a container) is very similar to a non-multitenant Oracle data-
base. The PDB is a named entity that contains tablespaces (and thus physical data files),
schemas, schema objects, and the like. A PDB also has its own UNDO tablespace. A PDB
does not have its own online redo logs or its own control files.
A PDB is owned by a CDB. A CDB can own one or more PDBs. Thus, if you have three
Oracle databases—one for HR ( HR ), one for Payroll ( PAY ), and one for Accounts Payable
( AP )—you can take each of those databases and plug them into a container database called
the CDB. Now, instead of three databases and three instances, you have three databases and
one instance. This makes for much more efficient use of memory and other system resources.
While you can connect to an Oracle CDB by setting the ORACLE_SID environment variable,
in most cases, you need to connect to a PDB through an Oracle Net service name. When the
PDB is created, a service will be created for that PDB with the listener that the CDB is regis-
tered with. You will need to update the network naming resolution methods (i.e., tnsnames
.ora ) to be able to access that service, or you can use the Oracle EZCONNECT string.
PDBs can be plugged in (or installed) or unplugged (removed) from the CDB. Thus, it's
easy to move or duplicate databases within a CDB or across CDBs. You simply unplug the
database from one CDB and plug it into another CDB. In the process, you might need to
move those files, but it's still very simple. You can also easily duplicate a PDB from within a
CDB with a very simple process.
We mentioned that when a CDB is created, some PDBs are created at that time. These
PDBs include the root container (which is really a CDB but it looks like a PDB) and the seed
PDB. See Chapter 12 for more information on the PDBs that are created when the CDB is
created and for more information on moving or duplicating PDBs.
What we want to talk about in this chapter is backing up and restoring CDBs and PDBs.
We will also discuss using Oracle Data Pump with CDBs and PDBs. With that in mind,
let's continue.
Backing Up CDBs with RMAN
We have already discussed using RMAN to backup non-multitenant Oracle databases.
Using RMAN with CDBs and PDBs is not very different. In this section, we will briefly
discuss backing up CDBs with RMAN.
You are already familiar with backups using RMAN from the last few chapters. When
you are working with a multitenant Oracle database, the procedures you will use to back
up CDBs are not much different.
Search WWH ::




Custom Search