Database Reference
In-Depth Information
It almost goes without saying that the user executing any of these statements needs elevated privileges. A new
system privilege has been introduced, which unsurprisingly has been called “create pluggable database”. Before you
can create a new PDB, you need to consider your options:
Create a new PDB from the seed
Create a new PDB from another local PDB
Create a new PDB from a remote PDB
Plug-in a PDB into a CDB
Plug a non-CDB into a CDB as a new PDB
The following sections detail all these steps. Regardless of which source you chose to clone the PDB, you have a
number of clauses available to fine-tune your new Pluggable Database.
Creating a PDB from the seed database
Creating a PDB from the seed database is the easiest way to get started with Pluggable Databases. By default, the new
PDB will consist of a SYSTEM, SYSAUX, UNDO, and TEMP tablespace. It will be accessible by all common users
(see section “Users and roles” later in the chapter for an introduction into the new security concept). For now let it
suffice that a common user can connect to the root and any container using the same username and password. The
other user class is represented by the local users, which you already assumed, can only connect to specific PDBs.
When you create a PDB from the seed, you need to specify a mandatory admin user. This is the only mandatory
clause you need to specify if you are using Oracle Managed Files or ASM for that matter. Therefore, the basic statement
to create a PDB is as simple as this:
SYS@CDB$ROOT> create pluggable database pdb2
2 admin user pdbdba identified by password;
Pluggable database created.
A few seconds later the statement completes and you have your first working PDB! The operation is documented
in the alert log of the CDB:
create pluggable database pdb2 admin user pdbdba identified by *
2013-09-25 10:35:23.445000 +01:00
****************************************************************
Pluggable Database PDB2 with pdb id - 4 is created as UNUSABLE.
If any errors are encountered before the pdb is marked as NEW,
then the pdb must be dropped
****************************************************************
Deleting old file#5 from file$
Deleting old file#7 from file$
Adding new file#22 to file$(old file#5)
Adding new file#23 to file$(old file#7)
2013-09-25 10:35:24.814000 +01:00
Successfully created internal service pdb2 at open
ALTER SYSTEM: Flushing buffer cache inst=0 container=4 local
****************************************************************
Post plug operations are now complete.
Pluggable database PDB2 with pdb id - 4 is now marked as NEW.
****************************************************************
Completed: create pluggable database pdb2 admin user pdbdba identified by *
 
Search WWH ::




Custom Search