修改PDB系统参数,不影响CDB与其他的PDB
SQL> set linesize 200
SQL> show parameter optimizer_use_sql_plan_baselines
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
optimizer_use_sql_plan_baselines boolean TRUE
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1_WHS READ WRITE NO
4 PDB2_WHS MOUNTED
5 PDB3_WHS READ WRITE NO
SQL> alter session set container=PDB1_WHS;
Session altered.
SQL> show parameter optimizer_use_sql_plan_baselines
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
optimizer_use_sql_plan_baselines boolean TRUE
SQL> alter system set optimizer_use_sql_plan_baselines=false scope=both;
System altered.
SQL> show parameter optimizer_use_sql_plan_baselines;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
optimizer_use_sql_plan_baselines boolean FALSE
这里可以看到optimizer_use_sql_plan_baselines已经是false,看看其他pdb与CDB的参数是什么值
SQL> alter session set container=PDB3_WHS;
Session altered.
SQL> show parameter optimizer_use_sql_plan_baselines;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
optimizer_use_sql_plan_baselines boolean TRUE
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@cat1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun May 1 21:55:53 2005
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> set linesize 200
SQL> show parameter optimizer_use_sql_plan_baselines
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
optimizer_use_sql_plan_baselines boolean TRUE
SQL>