Oracle当前用户SQL

select sesion.sid,
sesion.serial#,
sesion.username,
sesion.sql_id,
sesion.sql_child_number,
optimizer_mode,
hash_value,
address,
sql_text
from v$sqlarea sqlarea, v$session sesion
where sesion.sql_hash_value = sqlarea.hash_value
and sesion.sql_address = sqlarea.address
and sesion.username is not null;

 

打印sql html

set linesize 1000
set trimspool on
set term off verify off feedback off pagesize 999
set markup html on entmap on spool on
set echo off
spool /tmp/html1.html replace
select * from table;
spool off
set markup html off
set echo on

 

-------------------

AVAST:C63088777H1200A0413-AZHFEZ79

Oracle当前用户SQL

上一篇:详解Oracle DELETE和TRUNCATE 的区别


下一篇:linux中执行定时任务对oracle备份(crontab命令)