Monday, April 14, 2014

v$session - LAST_CALL_ET columns

In v$session view the  LAST_CALL_ET   column denotes:

If the session STATUS is currently ACTIVE,
then the value represents the elapsed time in seconds since the session has become active.

If the session STATUS is currently INACTIVE,
then the value represents the elapsed time in seconds since the session has become inactive.

Thursday, April 10, 2014

Query to find pid of lgwr


SQL> select pid, program from v$process where program like '%LGWR%';
----------------------------------------------------------------------------------------
SQL> SELECT p.spid, s.program
  2  FROM v$session s, v$process p
  3  WHERE s.paddr=p.addr
  4  AND s.program LIKE '%LGWR%';

 
SPID                     PROGRAM
------------------------ ------------------------------------------------
26803                    oracle@orcl11gR2.us.oracle.com (LGWR)

 

ps -ef | grep 26803 | grep -v grep
oracle 26803     1   0   Jan 14 ?           2:11 ora_lgwr_ORCL11GR2