set linesize 200 pagesize 0 SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(sql_id=>'&sql_id', format=>'ALLSTATS LAST +cost +bytes +outline +PEEKED_BINDS +adaptive')); select * from table(dbms_xplan.display_awr(sql_id=>'&sql_id', format=>'ALLSTATS LAST +cost +bytes +outline +PEEKED_BINDS +adaptive')); select * from table(dbms_xplan.display_sql_plan_baseline('&sql_handle','&plan_name','typical')); col begin_interval_time for a30 col end_interval_time for a30 select snap_id,begin_interval_time,end_interval_time from dba_hist_snapshot order by snap_id asc / select snap_id,BEGIN_INTERVAL_TIME, startup_time from dba_hist_snapshot where trunc(end_interval_time) > (SELECT trunc(NEXT_DAY(sysdate,'FRIDAY')) -14 FROM dual) AND trunc(end_interval_time) 6hxw283cyw0ub and plan_hash_value for good plan that we want to force is 95728747.*/ Follow below steps to create sql baseline for sql_id STEP...
Start and stop the Pluggable & Container Database 1. Check the current session container. Note: I am login in CDB$ROOT container. SQL> show con_name CON_NAME -------------- CDB$ROOT Start and Stop pluggable database You should login in the pluggable or CDB$ROOT container. PDB shutdown can be managed from CDB$ROOT or by own PDB login. First step we will explain from CDB$ROOT connectivity. Second step will explain from direct PDB connectivity. 1. From CDB$ROOT container -- Check status from CDB$ROOT col name for a10 Select name,open_mode from v$pdbs; NAME OPEN_MODE ---------- ---------- PDB$SEED READ ONLY XEPDB1 READ WRITE PDB2 READ WRITE --Shutdown the PDB2 database alter pluggable database PDB2 close immediate; Pluggable database altered. ---Note: Shutdown change OPEN_MODE value to MOUNTED. --Start the PDB2 database alter pluggable database PDB2 open; Pluggable database altered. 2. From PDB direct connectivity --check you are in PDB show con_name CON...