Posts

Showing posts from December, 2019

blocking sessions and tabelspace

set pages 1000 set long 2000     set colsep '  |  '     set linesize 190     col LOCKED_EVT for a15     col SEC_WAIT for 99999999     col LOCKED_USER for a60     col LOCKER_USER for a60     with t as (         select             a.event as LOCKED_EVT,             a.wait_time_micro/1000000 as LOCKED_WAIT_SEC,             a.osuser as locked_osuser,             a.schemaname as LOCKED_SCHEMANAME,             a.machine as locked_machine,             a.sid as locked_sid,             a.serial# as LOCKED_SERIAL,             a.program as locked_program,             a.Action as locked_Action,     ...

Snapshot Standby database and how to convert physical standby database to snapshot standby database (READ WRITE mode)

Snapshot Standby database and how to convert physical standby database to snapshot standby database (READ WRITE mode) SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; Session altered. SQL> SELECT   a.thread#,  b. last_seq, a.applied_seq, a. last_app_timestamp, b.last_seq-a.applied_seq   ARC_DIFF FROM (SELECT  thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp FROM gv$archived_log WHERE applied = 'YES' GROUP BY thread#) a,           (SELECT  thread#, MAX (sequence#) last_seq FROM gv$archived_log GROUP BY thread#) b WHERE a.thread# = b.thread#;    THREAD#   LAST_SEQ APPLIED_SEQ LAST_APP_TIMESTAMP     ARC_DIFF ---------- ---------- ----------- -------------------- ----------          1         75          75 04-DEC-2019 11:09:55          ...