首页 > 数据库 > Oracle > 正文

Oracle中查看正在运行的SQL进程脚本分享

2020-07-26 14:16:25
字体:
来源:转载
供稿:网友

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;

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表