Oracle 19c: pdb_storage_clause

As a features beginning with 12.2, we have 3 limits of storages when creating a PDB, based on Oracle documentation:

pdb_storage_clause

Use this clause to specify storage limits for the PDB.

Use MAXSIZE to limit the amount of storage that can be used by all tablespaces in the PDB to the value specified with size_clause. This limit includes the size of data files and temporary files for tablespaces belonging to the PDB. Specify MAXSIZE UNLIMITED to enforce no limit.

Use MAX_AUDIT_SIZE to limit the amount of storage that can be used by unified audit OS spillover (.bin format) files in the PDB to the value specified with size_clause. Specify MAX_AUDIT_SIZE UNLIMITED to enforce no limit.

Use MAX_DIAG_SIZE to limit the amount of storage for diagnostics (trace files and incident dumps) in the Automatic Diagnostic Repository (ADR) that can be used by the PDB to the value specified with size_clause. Specify MAX_DIAG_SIZE UNLIMITED to enforce no limit.

If you omit this clause, or specify STORAGE UNLIMITED, then there are no storage limits for the PDB. This is equivalent to specifying STORAGE (MAXSIZE UNLIMITED MAX_AUDIT_SIZE UNLIMITED MAX_DIAG_SIZE UNLIMITED).

In production basically we don’t put a storage limit in the PDB, but when we create a test PDB environment, we can fix from the beginning of after creation a storage limit:

Exemple: MAXSIZE to 6G

SQL> alter pluggable database wado storage (maxsize 6G);

Exemple: MAX_AUDIT_SIZE to 500M

SQL> alter pluggable database wado storage (max_audit_size 500M);

Exemple: MAX_DIAG_SIZE to 200M

SQL> alter pluggable database wado storage (max_diag_size 200M);

Exemple: Specify the three parameters for an other PDB

SQL> alter pluggable database wado01 storage (maxsize UNLIMITED max_audit_size 2G max_diag_size 1G);

To check the storage limits for the PDB:

SQL> select name , MAX_SIZE/1024/1024 "Max Size Mo",MAX_DIAGNOSTICS_SIZE/1024/1024 "Max DIAG Mo", MAX_AUDIT_SIZE/1024/1024 "Max AUDIT Mo" from v$pdbs where name like 'WADO%';

NAME Max Size Mo Max DIAG Mo Max AUDIT Mo
-------------------- ----------- ----------- ------------
WADO 6144 200 500
WADO01 0 1024 2048

Enjoy !

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply