versql

scripts>versql

 

set wrap on
set long 10000
set verify off
set pagesize 50000
set lines 130
column sql_text heading “Texto SQL” format a80 word
column Programa format a20 word
col sid format 999
col Veces format 9999
col username format a10

alter session set nls_date_format=’DDMMYYYY HH24:MI:SS’;
prompt
prompt

select
s.sid,s.username,
substr(s.program,instr(replace(s.program,’\’,’]’),’]’,-1)+1) Programa,
t.last_load_time,
t.last_active_time,
t.sql_fulltext,
t.old_hash_value
from
v$sqlarea t,
v$session s
where
s.sql_address = t.address
and s.sql_hash_value = t.hash_value
and s.sid = &1
/

Comment

Fill in your details below or click an icon to log in:

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