Oracle中查看正在运行的SQL进程脚本分享
程序员文章站
2023-01-23 10:05:00
oracle的show processlist
复制代码 代码如下:
set linesize 400;
set pagesize 400;
col sql_tex...
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;