Search This Blog

Saturday, 23 June 2018

How to check all sessions information (active and inactive):

Below is the query to check connection with services:
======================================

col sid head "Sid" form 9999 trunc
  col SERVICE_NAME for a30;
 col serial# form 99999 trunc head "Ser#"
 col username form a8 trunc
 col osuser form a7 trunc
 col machine form a20 trunc head "Client|Machine"
 col program form a15 trunc head "Client|Program"
 col login form a11
 col "last call" form 9999999 trunc head "Last Call|In Secs"
 col status form a6 trunc
 select sid,serial#,substr(username,1,10) username,substr(osuser,1,10) osuser,
 substr(program||module,1,15) program,substr(machine,1,22) machine,
 SERVICE_NAME,
 to_char(logon_time,'ddMon hh24:mi') login,
 last_call_et "last call",status,sql_hash_value
 from v$session
 order by login
 /
 

Wednesday, 13 June 2018

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property



        Need to check on DelayMins configuration on all standby’s

ð  DGMGRL> show database verbose 'TESH957P_DC2' 'delaymins';

        Check MRP process is running or not.

ð  SYS@TESH957P SQL>SELECT PROCESS, STATUS, THREAD#, SEQUENCE#,BLOCK#, BLOCKS FROM V$MANAGED_STANDBY where PROCESS like 'MRP%';

          Need to restart Intended State option:

ð  edit database "TESH957P_DC1" set state=apply-off;

ð  edit database "TESH957P_DC1" set state=apply-on;

         And need to cancel the MRP process while enabling i have used " CURRENT LOGFILE " option.

ð  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

ð  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;