Changes instance parameter in CDB and PDB databases of Oracle
Changes the instance parameter in Container databases CDB
It is the same thing as you do in NON-CDB database, you simply connect with the CDB$ROOT database.
After connecting with ROOT database as normal you connected with NON-CDB instance.
You can modify the current database instance parameter with simple command:
ALTER SYSTEM SET parameter_name= value;
ALTER SYSTEM SET parameter_name=value CONTAINER=current;
ALTER SYSTEM SET parameter_name=value CONTAINER=current SCOPE=BOTH/SPFILE/MEMORY;
Changes of instance parameter effect all PDBs and CDB database
First connect with root database then you can able to fire command for all PDBs database.
ALTER SYSTEM SET parameter_name=value CONTAINER=ALL;
Change the parameter for PDB database
We can change the parameter for PDB by two ways:
1. Connecting from ROOT and change the container to particular PDB by alter system set container command, then change PDB specific parameter.
2. Connect directly PDB by sysdba user then change with Alter system command as simple database.
-- First way
CONN / AS SYSDBA
ALTER SESSION SET CONTAINER = pdb1;
ALTER SYSTEM SET parameter_name=value;
ALTER SYSTEM SET parameter_name=value CONTAINER=CURRENT;
--Second way
CONN sys@pdb1 as sysdba
ALTER SYSTEM SET parameter_name=value;
ALTER SYSTEM SET parameter_name=value CONTAINER=CURRENT;
Check which parameter is modified at PDB level
SELECT name,value FROM v$system_parameter WHERE ispdb_modifiable = 'TRUE' ORDER BY name;