Create a Pluggable Database (PDB) Manually
To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file should be placed. We can do this using one of two methods. The first method uses the FILE_NAME_CONVERT clause in the CREATE PLUGGABLE DATABASE statement.
CONN / AS SYSDBA
SQL> SELECT name, open_mode
FROM v$pdbs
ORDER BY name;
2 3
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDB2 READ WRITE
PDB3 READ WRITE
To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file should be placed. We can do this using one of two methods. The first method uses the FILE_NAME_CONVERT clause in the CREATE PLUGGABLE DATABASE statement.
CONN / AS SYSDBA
SQL>CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/media/sf_12cR1/12cDB/cdb1/pdb2/');
database created.
SQL> ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;
SQL> SELECT name, open_mode
FROM v$pdbs
ORDER BY name;
2 3
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDB2 READ WRITE
PDB3 READ WRITE
No comments:
Post a Comment