Dataguard missing archivelog

Below you can find one of the available solutions that can be applied to solve this issue: PRI select max(sequence#) from v$archived_log where applied=’YES’; STBY select max(sequence#) from v$archived_log where applied=’YES’; SQL> select * from v$archive_gap;    THREAD# LOW_SEQUENCE# HIGH_SEQUENCE# ———- ————- ————–          1          285           285 RMAN> list ARCHIVELOG FROM SEQUENCE 286 until SEQUENCE…

LogMiner out-of-memory

First we need to get the name of the CAPTURE process and the actual value and then start tuning it: col capture_name format a30 col parameter format a50 col value format a50 col set_by_user format a3 select capture_name,parameter, value,set_by_user from Dba_Capture_Parameters where capture_name like upper(‘&capture_name’); BEGIN dbms_capture_adm.set_parameter(capture_name => ‘&capture_name’,                               parameter  => ‘_SGA_SIZE’,                               VALUE     …

Grab stats for partitions

Useful scripts to grab stats for partitions: set serveroutput on DECLARE LV_SQL VARCHAR2(1000); CURSOR C1 IS SELECT TABLE_NAME T , PARTITION_NAME P , LAST_ANALYZED L  FROM USER_TAB_PARTITIONS WHERE LAST_ANALYZED is null AND TABLE_NAME = ‘&TABLE_NAME’ and partition_name like (‘&PART_NAME’); BEGIN   FOR I IN C1 LOOP    dbms_output.put_line(‘Gathering stats for :’||I.P);    LV_SQL:= ‘BEGIN  ‘;…

Get the blocking sessions

select s1.username || ‘@’ || s1.machine     || ‘ ( SID=’ || s1.sid || ‘ )  is blocking ‘     || s2.username || ‘@’ || s2.machine || ‘ ( SID=’ || s2.sid || ‘ ) ‘ AS blocking_status     from v$lock l1, v$session s1, v$lock l2, v$session s2     where s1.sid=l1.sid and s2.sid=l2.sid     and…

Where is the TEMP space used?

The following statements should give us more indication about the TEMP usage and what is using it: col username format a10 col osuser format a8 col SID_SERIAL format a8 col PROCESS format 9999999 col tablespace format a7 col status format a9 col size_mb format 9999999999999 set lin 300 SELECT   b.TABLESPACE        –, b.segfile#        –,…