Oracle allows some initialization parameters to be modified while connected as a privileged user to a PDB. You can view these parameters via the following query:
SQL> select name from v$parameter where ispdb_modifiable=’TRUE’ order by name; Here is a snippet of the output:
NAME
sort_area_size
sql_trace sqltune_category star_transformation_enabled statistics_level
When you make initialization parameter changes while connected directly to a PDB, these changes affect only the currently connected PDB.
The parameter changes do not affect the root container or other PDBs. For example, say you wanted to change the value of OPEN_CURSORS.
First, connect directly to the PDB as a privileged user, and issue the ALTER SYSTEM statement:
$ sqlplus pdbsys/Cr4zyPas$$word1@mm23c:1521/salespdb as sysdba SQL> alter system set open_cursors=100;
The prior change modifies the value of OPEN_CURSORS only for the SALESPDB. Furthermore, the setting of OPEN_CURSORS for SALESPDB will persist across database restarts.
Renaming a PDB
Occasionally, you may be required to rename a PDB. For instance, the database may have been originally misnamed, or you may no longer be using the database and want to append _OLD to its name.
To rename a pluggable database, first connect to it as SYSDBA-privileged account:
$ sqlplus pdbsys/Cr4zyPas$$word1@mm23c:1521/salespdb as sysdba
Next, stop the PDB and restart it in restricted mode:
SQL> shutdown immediate; SQL> startup restrict;
Now, the pluggable database can be renamed:
SQL> alter pluggable database rename global_name to salespdb2022;
Limiting the Amount of Space Consumed by PDB
You can place an overall limit on the amount of disk space a PDB can consume. This is not just the max size of the datafiles, but the complete set of datafiles for multiple tablespaces.
The sizing of the databases should be available through ASM diskgroups or filesystem sizing.
In this example, an overall limit of 500GB is placed on a pluggable database. First, connect to the pluggable database as SYS:
$ sqlplus pdbsys/Cr4zyPas$$word1@mm23c:1521/salespdb as sysdba
Then alter the pluggable database’s maximum size limit. This command limits the size of the pluggable database to a maximum of 500GB:
SQL> alter pluggable database salespdb storage (maxsize 500G);
The space is not the only resource that can be limited by PDB. CPU and memory can be limited by using the parameters in the PDB or using resource management plans.
As a privileged user in the PDB, you can alter the system to set CPU_COUNT equal to less than over all CPU_COUNT for the CDB. This will not allow the PDB to use more than those CPU resources.
The same is for memory in setting the memory limit parameters in the PDB, again less than the CDB. Connect to the PDB and use the following alter statements:
SQL> alter system set CPU_COUNT = 2 scope = both; SQL> alter system set SGA_TARGET = 16G scope = both;