Chinaunix首页 | 论坛 | 博客
  • 博客访问: 273969
  • 博文数量: 111
  • 博客积分: 1591
  • 博客等级: 上尉
  • 技术积分: 877
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-20 15:14
文章分类

全部博文(111)

文章存档

2014年(1)

2012年(41)

2011年(69)

分类:

2011-10-24 11:53:07

原文地址:查询当前Oracle执行那些SQL 作者:g_hk

SQL> col username for a30;                          
SQL> col machine for a30;
SQL> set linesize 160;
SQL> select username,machine,sid,sql_id,status,prev_sql_id,logon_time from v$session where username='SYSTEM';

USERNAME                       MACHINE                               SID SQL_ID        STATUS   PREV_SQL_ID   LOGON_TIM
------------------------------ ------------------------------ ---------- ------------- -------- ------------- ---------
SYSTEM                         WORKGROUP\SIMOS                       519               INACTIVE 8f1sjvfxuup9w 21-SEP-11
SYSTEM                         dm01db02.xjods.com                    765 cmn1wnr79nxsu INACTIVE cmn1wnr79nxsu 21-SEP-11
SYSTEM                         WORKGROUP\SIMOS                      1390               INACTIVE 9m7787camwh4m 21-SEP-11
SYSTEM                         dm01db01.xjods.com                   2146               ACTIVE   7z2rh3s0t3zy2 21-SEP-11

SQL> select sql_id,sql_fulltext from v$sql where sql_id='7z2rh3s0t3zy2';

SQL_ID        SQL_FULLTEXT
------------- --------------------------------------------------------------------------------
7z2rh3s0t3zy2 begin
              for i in 1..99999999 loop
              execute immediate 'select * from dba_objects';
阅读(4403) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~