Chinaunix首页 | 论坛 | 博客
  • 博客访问: 978980
  • 博文数量: 584
  • 博客积分: 2293
  • 博客等级: 大尉
  • 技术积分: 3045
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-28 11:15
文章分类

全部博文(584)

文章存档

2012年(532)

2011年(47)

2009年(5)

我的朋友

分类:

2012-05-17 23:36:40

  1. 查询 hang session.
    1. by username
      select a.sid, a.serial#, b.sql_text from v$session a, v$sqlarea b where a.sql_address=b.address and a.username='xx' ;
    2. by provide sid
      select a.sid, a.serial#, b.sql_text from v$session a, v$sqlarea b where a.sql_address=b.address and a.sid='xx' ;
    3. find a blocking session detail
      select a.blocking_session, a.sid, a.serial#, a.wait_class, a.seconds_in_wait, b.sql_text from v$session a, v$sqlarea b where a.blocking_session is not NULL and a.sql_address=b.address order by a.blocking_session;
  2. 处理 hang session
    1. alter system kill session 'sid,serial#' ;
    2. ps -ef|grep pid, kill -9 PID
阅读(211) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~