set wrap off
set lines 130
set pages 100
col owner format a12 heading ‘Owner’
col session_id format 9999 heading ‘Sid’
col object_type format a20 heading ‘Type’
col object_name format a30 heading ‘Objeto’
col oracle_username format a15 heading ‘Username’
col os_user_name format a15 heading ‘OS user’

select l.SESSION_ID,
o.owner,
o.object_type,
o.object_name,
l.oracle_username,
l.os_user_name
FROM gv$locked_object l,
dba_objects o
WHERE l.object_id = o.object_id
ORDER by l.SESSION_ID,o.object_name;  

set lines 1000 pages 100
col username    form a10
col osuser      form a15
col program     form a50
col logon_time  form a20
alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
ttitle left skip 1 "SESSÕES" skip 2
select   sid, serial#, username, osuser, status, program, logon_time 
from     v$session 
order by logon_time;
ttitle off; 

hostgator