Creating a PDB database from seed template

In this post I will be showing a simple example of how to create a PDB database from the seed template.
Therefore, follow the examples:

1-The database must be CDB and you have to be connected in CDB$ROOT:


[oracle@dbdg admin]$ sqlplus "/as sysdba" 

SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 8 20:31:41 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name, cdb from v$database;

NAME	  CDB
--------- ---
CDB4	  YES

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

2- Create the PDB from seed:

SQL> CREATE PLUGGABLE DATABASE techdatabasket ADMIN USER brunors IDENTIFIED BY oracle4_U FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb4/pdbseed/','/u01/app/oracle/oradata/cdb4/techdatabasket');

Pluggable database created.

3- Open the new PDB in read/write mode:

SQL> ALTER PLUGGABLE DATABASE techdatabasket OPEN READ WRITE;

Pluggable database altered.

4- Check the status of the new PDB:


SQL> SELECT NAME, OPEN_MODE FROM V$PDBS WHERE NAME='TECHDATABASKET';

NAME OPEN_MODE
------------------------------ ----------
TECHDATABASKET READ WRITE

SQL> SHOW CON_NAME

CON_NAME
------------------------------
CDB$ROOT

 

Neste post estarei mostrando um simples exemplo de como se criar um banco de dados PDB do template seed.
Sendo assim, seguem os exemplos:

 

1-O banco de dados  deve ser CDB e estar conectado no CDB$ROOT


[oracle@dbdg admin]$ sqlplus "/as sysdba" 

SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 8 20:31:41 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name, cdb from v$database;

NAME	  CDB
--------- ---
CDB4	  YES

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

2-Criar o PDB através do  seed:

SQL> CREATE PLUGGABLE DATABASE techdatabasket ADMIN USER brunors IDENTIFIED BY oracle4_U FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb4/pdbseed/','/u01/app/oracle/oradata/cdb4/techdatabasket');

Pluggable database created.

3-Abrir o novo PDB no modo read/write:

 

SQL> ALTER PLUGGABLE DATABASE techdatabasket OPEN READ WRITE;

Pluggable database altered.

4- Verificar o status do novo PDB:

SQL> SELECT NAME, OPEN_MODE FROM V$PDBS WHERE NAME='TECHDATABASKET';

NAME OPEN_MODE
------------------------------ ----------
TECHDATABASKET READ WRITE

SQL> SHOW CON_NAME

CON_NAME
------------------------------
CDB$ROOT

Related posts

Leave a Comment