oracle中查看正在运行的sql进程脚本分享
2015-01-04来源:

oracle的show processlist

代码如下:

set linesize 400;

set pagesize 400;

col sql_text format a100;

col machine format a25;

col username format a15;

select a.username,a.machine, b.sql_id, b.sql_text

from v$session a, v$sqlarea b

where a.sql_address = b.address

and a.sql_hash_value = b.hash_value;

oracle show full processlist

代码如下:

set linesize 400;

set pagesize 400;

set long 4000;

col sql_fulltext format a100;

col machine format a25;

col username format a15;

select a.username,a.machine, b.sql_id, b.sql_fulltext

from v$session a, v$sqlarea b

where a.sql_address = b.address

and a.sql_hash_value = b.hash_value;

更多信息请查看IT技术专栏

推荐信息
Baidu
map