Increasing PDB quota is one of the important task in the multitenant architecture environment because in the absence of low PDB quota the application will halt , Below are the steps to alter/increase PDB Quota.
NOTE : In 19c , Whenever we alter PDB quota in primary database, The same will start getting reflected in standby database too , however if the DB version is 12CR1 then we've to bounce the Standby database so that the target PDB start getting reflected with the new PDB QUOTA.
Step 1st : Verify container ID in which we're supposed to increase the QUOTA
SQL> show pdbs
CON_ID CON_NAME OPEN_MODE RESTRICTED
-------------- ---------------- ---------- ----------
2 PDB$SEED READ ONLY NO
3 TEST READ WRITE NO
STEP 2nd : SQL Query To Check current PDB Quota
select (select name from v$pdbs where con_id=u.CON_ID) pdb_name, u. PROPERTY_NAME, u.quota_allocated_in_gb, 1.Total_PDB_Usage_in_GB from (select CON_ID, nvl (PROPERTY_NAME, 'MAX_QUOTA') PROPERTY_NAME, nvl (decode(PROPERTY_VALUE, 'UNLIMITED', 'UNLIMITED', round (PROPERTY_VALUE/1024/1024/1024,2)),0)quota_allocated_in_gb from CDB PROPERTIES where con_id=&&con_id and PROPERTY_NAME like '%STORAGE%') u,(select a.data_size+b.temp_size Total_PDB_Usage_in_GB from(select sum (bytes)/1024/1024/1024 data_size from cdb_data_files where CON_ID=&&con_id) a,(select nvl (sum (bytes), 0)/1024/1024/1024 temp_size from cdb_temp_files where con_id=&&CON_ID ) b) 1;
Enter value for con id: 3
old 4: from CDB PROPERTIES where con_id=&&con_id and PROPERTY_NAME like 'STORAGE') u,
new 4: from CDB_PROPERTIES where con_id=3 and PROPERTY NAME like '%STORAGE') u,
old 6: (select sum (bytes)/1024/1024/1024 data size from cdb_data_files where CON_ID=&&con_id) a,
new 6: (select sum (bytes)/1024/1024/1024 data_size from cdb data files where CON_ID=3) a,
old 7: (select nvl (sum (bytes), 0)/1024/1024/1024 temp_size from cdb_temp_files where con_id=&&CON_ID) b) 1
new 7: (select nvl (sum (bytes), 0)/1024/1024/1024 temp_size from cdb_temp_files where con id=3) b) 1
PDB_NAME |PROPERTY_NAME |QUOTA_ALLOCATED_IN_GB |TOTAL_PDB_USAGE_IN_GB
----------------------|--------------------|---|---------------------
TEST |MAX_PDB_STORAGE |5 | 5.24461365
Step 3rd : Alter/Increase PDB QUOTA
SQL>Alter Pluggable database TEST storage(MAX_SIZE 10G);
Step 4th : Check PDB QUOTA Again
PDB_NAME |PROPERTY_NAME |QUOTA_ALLOCATED_IN_GB |TOTAL_PDB_USAGE_IN_GB
------------------|--------------------|-------|---------------------
TEST |MAX_PDB_STORAGE |10 | 5.24461365