如果把数据库从11g 升级到12c,或者在12c中创建的,就是NON CDB,那么这样的数据库就是普通的单实例,
和12c 之前的数据库没有区别,但12c 的特点就是CDB 管理,所以既然上12c,还是要切换成CDB 进行管理。
ORCLE 12.1 Creation of a PDB from a Non-CDB
You can move a non-CDB into a PDB.
You can accomplish this task in the following ways:
Executing
DBMS_PDB.DESCRIBE
on a non-CDB in Oracle Database 12
c
You place a non-CDB in a transactionally consistent state, and then run the
DBMS_PDB.DESCRIBE
function to generate XML metadata about this database. While connected to the root in the CDB, you execute the
CREATE PLUGGABLE DATABASE
statement to create a PDB from the existing non-CDB. Finally, to convert the definitions in the PDB data dictionary to references to objects in
CDB$ROOT
, log in to the PDB and run the
noncdb_to_pdb.sql
script.
See
Oracle Database Administrator’s Guide
to learn how to perform this technique.
Using Oracle Data Pump with or without transportable tablespaces
You can define a data set on a non-CDB using Oracle Data Pump. This non-CDB can be in the current or a previous Oracle Database release, for example, Oracle Database 10
g
. You create an empty PDB in an existing CDB, and then use Oracle Data Pump to import the data set into the PDB.
A Full Transportable Export using Oracle Data Pump exports all objects and data necessary to create a complete copy of the database. Oracle Data Pump exports objects using direct path unload and external tables, and then imports objects using
direct path INSERT
and external tables. The Full Transportable dump file contains all objects in the database, not only table-related objects. Full Transportable Export is available starting in Oracle Database 11
g
Release 2 (11.2.0.3) for import into Oracle Database 12
c
.
See
Oracle Database Administrator’s Guide
to learn how to perform this technique.
Using Oracle GoldenGate replication
You replicate the data from the non-CDB to a PDB. When the PDB becomes current with the non-CDB, you switch over to the PDB.
See
Oracle Database Administrator’s Guide
to learn how to perform this technique.
ORACLE 12.2 Creation of a PDB by Cloning a PDB or a Non-CDB
To clone a PDB or non-CDB, use the
CREATE PLUGGABLE DATABASE
statement with the
FROM
clause.
In this technique, the source is either a non-CDB, or a PDB in a local or remote CDB. The target is the PDB copied from the source. The cloning operation copies the files associated with the source to a new location, and then assigns a new GUID to create the PDB.
This technique is useful for quickly creating PDBs for testing and development. For example, you might test a new or modified application on a cloned PDB before deploying the application in a production PDB.
If a PDB is in
, then the source PDB can be open in read/write mode during the operation, referred to as
.
Note:
If you clone a PDB from a remote CDB, then you must use a
database link
.
多租户架构文档的路线图
Category
Topic
Documentation
Concepts
Overview of CDBs and PDBs
Chapters in
Oracle Database Concepts
, and
Oracle Database Administrator’s Guide
Administration
Creating and configuring a CDB
Administration
Creating and configuring PDBs
Administration
Creating and removing application containers
Administration
Administering application containers
Monitoring
Viewing information about CDBs and PDBs
Backup and Recovery
Performing backup and recovery in a CDB
Security
Managing common users, roles, and privileges in a CDB
Miscellaneous
All other tasks relating to managing a CDB or PDB, including Oracle RAC, resource management, data transfer, and so on
Oracle Database Administrator’s Guide
is the primary task-oriented intermediate and advanced documentation for managing CDBs. This guide also contains See Also links to books that cover different CDB topics. For example,
Oracle Database Utilities
explains concepts and tasks specific to PDBs when using Oracle Data Pump.