What SQL and sessions are running?

This page has been moved to http://andrewfraserdba.com/?p=38

Advertisements

3 Responses to “What SQL and sessions are running?”

  1. Mukesh Says:

    Following are errors on 10.2.0.1.0 on WIN XP SP2-

    
    SQL> set pages 9999 lines 132
    SQL> col username form a20
    SQL> col osuser form a20
    SQL> col program form a50
    SQL> col minutes form 999
    SQL> alter session set nls_date_format = `Dy DD-Mon-YYYY HH24:MI:SS'
      2  /
    alter session set nls_date_format = `Dy DD-Mon-YYYY HH24:MI:SS'
                                        *
    ERROR at line 1:
    ORA-00911: invalid character
    
    
    
    SQL> select distinct
      2  s.sid, s.username, s.osuser, s.program||' `||s.module program,
      3  s.status, s.last_call_Et/60 minutes, s.logon_time, w.state, w.event, w.seconds_in_wait ,
      4  q.sql_text
      5  from v$session s, v$sql q, v$session_wait w
      6  where ( s.status = `ACTIVE' or last_call_et < 60 )
      7  and s.sql_hash_value = q.hash_value
      8  and s.sql_address = q.address
      9  and s.sid = w.sid
     10  order by s.sid
     11  /
    where ( s.status = `ACTIVE' or last_call_et < 60 )
                                *
    ERROR at line 6:
    ORA-00923: FROM keyword not found where expected
    
    
    
  2. Andrew Fraser Says:

    Sorry Mukesh – was due to wordpress editor turning ‘ into ` symbol. Should be fixed now in main post.

  3. Mukesh Says:

    Its working fine now. Thanks.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: