Skip to main content

Posts

Showing posts from September, 2022

Create SQL Plan Baselines for High Resource Intensive SQL's from AWR - 12C

=>   Identify SNAP ID's for the interval Here I am collecting resource intensive SQL's ran on a week from Monday (12-SEP-22) to Friday (16-SEP-22) SQL> show pdbs     CON_ID CON_NAME                       OPEN MODE  RESTRICTED ---------- ------------------------------ ---------- ----------          2 PDB$SEED                       READ ONLY  NO          3 SITPDB                         READ WRITE NO SQL> alter session set container=SITPDB; Session altered. SQL> SQL> SQL> select min(snap_id) from dba_hist_snapshot where trunc(begin_interval_time)='12-SEP-22'; MIN(SNAP_ID) ------------         3324 SQL> select max(snap_id) from dba_hist_snapshot where trunc(begin_interval_time)='16-SEP-22'; MAX...

OCI VMDB System : Upgrade Database from 12c to 19c using dbcli

Environment : OCI VMDB System OS             : Oracle Linux 7 Note          : dbcli commands should be run as ROOT user =>  Obtain Pre-Authenticated Request URL You need a Pre-Authenticated Request URL (PAR URL), which is a unique URL generated for an Oracle Database 19c Oracle Home image that is stored as a zip file in the Oracle Cloud bucket. In addition to the PAR URL, you will also need values for the following two parameters that will be supplied to the dbcli tool when you run the dbcli create-dbhome command in Step 2 of Section 2. Version of the Oracle Database 19c Oracle Home image (--cloneVersion) Checksum (--sha256sum) of the zip file You can obtain the PAR URL and its two supporting parameters from Oracle Support by raising a service request as follows: Log in to My Oracle Support and click the Contact Us button at the top right. Click the Create Non-Technical SR button. Enter Problem Summary as: Request PAR U...

AWR Comparison Report

The awrddrpt.sql SQL script generates a report that compares performance attributes and configuration settings between two selected time periods on the local database instance.  The report compares top wait events, SQL performance, parameter changes etc between two snapshot intervals. Sample Test Case : Change SGA of PDB from 6 GB to 3 GB and verify it in AWR comparison report => For the purpose of testing, I am changing the snapshot interval to 15 minutes SQL> col SNAP_INTERVAL for a20 SQL> col retention for a20 SQL> select snap_interval, retention from dba_hist_wr_control; SNAP_INTERVAL        RETENTION -------------------- -------------------- +00000 01:00:00.0    +00008 00:00:00.0 SQL> execute dbms_workload_repository.modify_snapshot_settings(interval => 15,retention => 11520); PL/SQL procedure successfully completed. SQL> select snap_interval, retention from dba_hist_wr_control; SNAP_INTERVAL        RET...

OCI VMDB System : Delete old Oracle Home post database upgrade using dbcli

After the database upgrade from 12c to 19c, you will find two Oracle Homes on the server. Follow below steps to delete 12c oracle home => Find the database home ID of 12c oracle home [root@sitdb ~]# dbcli list-dbhomes ID                                       Name                 DB Version                               Home Location                                 Status ---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ---------- 6f64870a-8b63-4530-8a9d-132438e273a5     OraDB12102_home1     12.1.0.2.220719            ...

OCI VMDB System : Apply GI PSU using dbcli

Environment : OCI VMDB System OS : Oracle Linux 7 => dbcli commands should be run as root user. => Update dcs client and agent  [root@sitdb ~]# cliadm update-dbcli Job details ----------------------------------------------------------------                      ID:  1ac41360-f581-4ce8-b631-2b91e9ba1d64             Description:  DcsCli patching                  Status:  Created                 Created:  September 6, 2022 10:03:16 AM GST                 Message:  Dcs cli will be updated Task Name                                                                Start Time      ...