Posts

Showing posts from August, 2025

LOCKS

########################################################### ---   LOCKS ###########################################################   Run the following query to construct a query that retrieves the row affected by the locked row. Obtain the SID of waiting session from the output of the preceding step.   col SESSIONS format A20 SELECT DECODE(REQUEST,0,'Holder SID: ','Waiter SID: ') || SID SESSIONS, ID1, ID2, LMODE, REQUEST, TYPE FROM V$LOCK WHERE (ID1, ID2, TYPE) IN (SELECT ID1, ID2, TYPE FROM V$LOCK WHERE REQUEST > 0) ORDER BY ID1, REQUEST;     SESSIONS                     ID1         ID2       LMODE     REQUEST TY -------------------- ---------- ---------- ---------- ---------- -- Holder SID: 1             393233     ...

AWR

Image
  ****** AWR ******  Run the following query to display the AWR settings.  By default, the INTERVAL equals to 1 hour and the RETENTION equals to 8 days.    col SNAP_INTERVAL format a20  col RETENTION format a20  col TOPNSQL format a10  SELECT SNAP_INTERVAL, RETENTION, TOPNSQL FROM DBA_HIST_WR_CONTROL;    SNAP_INTERVAL        RETENTION            TOPNSQL -------------------- -------------------- ---------- +00000 01:00:00.0    +00008 00:00:00.0    DEFAULT     Modify the INTERVAL setting to 30 minutes.    BEGIN   DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(INTERVAL => 30);  END;  /    PL/SQL procedure successfully completed.   SELECT SNAP_INTERVAL, RETENTION, TOPNSQL FROM DBA_HIST_WR_CONTROL;   SNAP_INTERVAL        RETENTION  ...