Database Reference
In-Depth Information
although the admin user clause is mandatory to create a user-pDb, no one forces you to actually make use of
the account. It can be easily locked as part of the database build process after the pDb has been opened.
Note
Further options you can make use of include the definition of a default tablespace in the PDB. Omitting the
clause will lead to the new PDB's SYSTEM tablespace to become the default tablespace. Luckily Oracle allows you
to create that new tablespace if it does not yet exist, which is the case when you are cloning your PDB from the seed
database. The syntax is based on the well-known “create tablespace” command, reusing the same data file name spec
and extent management clause. Below is an example for creating a PDB from the seed with a new default tablespace
USERS, residing on OMF:
SYS@CDB$ROOT> create pluggable database pdb3
2 admin user pdbdba identified by secret
3 default tablespace pdb3_default_tbs datafile size 10G
4 /
Pluggable Database created.
If you are implementing a consolidated platform solution, then you certainly appreciate the ability to limit the
size of the PDB. This way a user could order a 100 GiB database, and your operations team does not have to limit the
size of individual data files. All the settings are implemented at deployment time. The pdb_storage_clause can be used
to either set the maximum size to unlimited. Alternatively the clause allows you to limit the amount of shared temp
space (for sorting on disk) as well as to set the size of the persistent storage. If the pdb_storage_clause is omitted there
is no limit to the size of the PDB, other than the physical storage of course. For example, you could limit the data file
growth to 100 G as shown in this example:
SYS@CDB$ROOT> create pluggable database pdb4
2 admin user pdbdba identified by secret
3 storage (maxsize 100G)
4 default tablespace pdb4_default_tbs datafile size 10G
5 autoextend on next 10G;
Pluggable database created.
If it should turn out that during the lifetime of the database more space is needed, the database limit can be
modified.
The new PDB can of course be placed into a different location. The file_name_convert clause allows you to
specify where the new PDB should be located to. Refer back earlier in this chapter to review the basics of the file name
conversion in Oracle. Consider for example this CDB which resides on a file system and not on ASM as the ones in the
previous examples:
SQL> select con_id, file_name from cdb_data_files
2 order by con_id
3 /
 
Search WWH ::




Custom Search