Tuesday 20 September 2016

Oracle12c DB CDB and PDB Auto start



Determining Whether a Database Is a CDB or Not:

SQL> SELECT NAME, CDB, CON_ID FROM V$DATABASE;

NAME          CDB     CON_ID
--------- --- -----------------------

APEXORA    YES          0

Creation of a PDB:

Creation of a PDB from Seed

You can use the CREATE PLUGGABLE DATABASE statement to create a PDB by copying the files from PDB$SEED, which is a template for creating PDBs. The following figure illustrates creation from the seed.
Creating a PDB Using the STORAGE, DEFAULT TABLESPACE, PATH_PREFIX, and FILE_NAME_CONVERT Clauses

CREATE PLUGGABLE DATABASE apexpdb ADMIN USER apexdb IDENTIFIED BY welcome123  STORAGE (MAXSIZE 5G MAX_SHARED_TEMP_SIZE 100M)  DEFAULT TABLESPACE sales     DATAFILE '/apps/apexora/app/apexora/oradata/APEXORA/apexpdb/apexpdb01.dbf' SIZE 250M AUTOEXTEND ON   PATH_PREFIX = '/apps/apexora/app/apexora/oradata/APEXORA/apexpdb/' FILE_NAME_CONVERT = ('/apps/apexora/app/apexora/oradata/APEXORA/pdbseed', '/apps/apexora/app/apexora/oradata/APEXORA/apexpdb');
Pluggable database created.
How to start the Pluggable DB:
SQL> select instance_name, version, status, con_id from v$instance;
INSTANCE_NAME    VERSION           STATUS           CON_ID
---------------- ----------------- ------------ ----------
APEXORA          12.1.0.2.0        OPEN                  0

We set save state parameter for APEXPDB:
As you see APEXPDB started as well. Other PDB’s are still mount mode. Because we did not set save state parameter for these PDB’s.
Let me start other PDB as well.
SQL> alter pluggable database PDBORCL OPEN;
Pluggable database altered.
I will put all PDBS in Save state and Bounce CDB .PDB will auto start after the save stateset.



























 Thanks
Srini

No comments:

Post a Comment


No one has ever become poor by giving