ITPUB论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
更多
查看: 2939|回复: 7

V$BLOCKING_QUIESCE 何时有数据? [复制链接]

注册会员

初级会员

精华贴数
0
技术积分
266
社区积分
0
注册时间
2005-6-24
论坛徽章:
2
2009新春纪念徽章
日期:2009-01-04 14:52:282010新春纪念徽章
日期:2010-03-01 11:19:07
发表于 2008-8-28 11:29:11 |显示全部楼层
V$BLOCKING_QUIESCE 何时有数据?


oracle 文档上说


QUOTE:
--------------------------------------------------------------------------------
You can determine the sessions that are blocking
the quiesce operation by querying the V$BLOCKING_QUIESCE view.
--------------------------------------------------------------------------------


做如下操作
1  session 1 登陆 update tmp_a set a=1;
2  session 2 ,sqlplus / as sysdba ; alter system quiesce  restricted; 此时该语句阻塞
3  session 3  ,sqlplus / as sysdba ; select * from V$BLOCKING_QUIESCE ; 没有任何输出
4  回到session 1 ,commit;
5  回到session 2中查看, system alterd.  确实是session1 阻塞了quiesce

什么时候 V$BLOCKING_QUIESCE  才有数据呢?

版主

版主

精华贴数
3
技术积分
9663
社区积分
197
注册时间
2001-10-9
论坛徽章:
23
ITPUB元老
日期:2005-02-28 12:57:002011新春纪念徽章
日期:2011-01-25 15:41:012011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-02-18 11:43:33ITPUB年度最佳技术回答奖
日期:2011-04-08 18:37:39现任管理团队成员
日期:2011-05-07 01:45:08ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412011新春纪念徽章
日期:2011-01-04 10:24:02ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51
发表于 2008-8-29 01:29:00 |显示全部楼层
Always state your Oracle version.

I reproduced the problem in 10.2.0.4. The blocking session is not in SYS_GROUP consumer group according to v$rsrc_session_info, so v$blocking_quiesce ignores it. You can find this out by checking this view's definition in v$fixed_view_definition:

SQL> select view_definition from v$fixed_view_definition where view_name = 'GV$BLOCKING_QUIESCE';

VIEW_DEFINITION
-----------------------------------------------------------------------------------------------------------------------------
select inst_id, sid_kgskvft from x$kgskvft         where active_kgskvft = 1         and mapped_cg_name_kgskvft <> 'SYS_GROUP'

So, a workaround can be directly querying its underlined x$ table without the group restriction:

select inst_id, sid_kgskvft from x$kgskvft where active_kgskvft = 1;

I encourage you to do more research, and also search on Metalink, possibly open an SR with Oracle.

Yong Huang

使用道具 举报

注册会员

初级会员

精华贴数
0
技术积分
266
社区积分
0
注册时间
2005-6-24
论坛徽章:
2
2009新春纪念徽章
日期:2009-01-04 14:52:282010新春纪念徽章
日期:2010-03-01 11:19:07
发表于 2008-8-29 14:30:18 |显示全部楼层
version: 10.2.0.1   + windows xp(32)



v$blocking_quiesce 是来源于 gv$blocking_quiesce 的,定义如下:
select inst_id, sid_kgskvft from x$kgskvft         where active_kgskvft = 1         and mapped_cg_name_kgskvft <> 'SYS_GROUP'


查询x$kgskvft 发现 SID 145  的  MAPPED_CG_NAME_KGSKVFT is NUll
145 正是我做update的 session ID


SQL> select inst_id, sid_kgskvft ,mapped_cg_name_kgskvft from x$kgskvft         where active_kgskvft = 1  ;

   INST_ID  SID_KGSKVFT     MAPPED_CG_NAME_KGSKVFT
---------- ----------- ----------------------------------------------------------------
         1         145              
         1         151                   SYS_GROUP
         1         159                   SYS_GROUP

使用道具 举报

版主

小V

精华贴数
6
技术积分
9712
社区积分
2806
注册时间
2008-8-22
论坛徽章:
101
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512011新春纪念徽章
日期:2011-01-04 10:24:022011新春纪念徽章
日期:2011-01-25 15:41:012011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-02-18 11:42:50现任管理团队成员
日期:2011-05-07 01:45:08ITPUB官方微博粉丝徽章
日期:2011-06-28 19:45:36ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53
发表于 2009-1-22 12:37:32 |显示全部楼层
好老的帖子啊,我才发了SR 7372626.992,oracle已经基本确定为bug。
我自己的一个workaround是:
create or replace view v$blocking_quiesce2
as
select x.inst_id, v.sid,v.serial#,v.SQL_HASH_VALUE,v.PREV_HASH_VALUE,v.status,v.service_name from x$kgskvft x,v$session v
where active_kgskvft = 1
and (x.mapped_cg_name_kgskvft <> 'SYS_GROUP' or x.mapped_cg_name_kgskvft is null)
and v.sid=x.sid_kgskvft
and v.service_name<>'SYS$BACKGROUND';

Oracle给的一个workaround是:
select p.spid, s.osuser, s.machine, s.username, s.sid, s.serial#
from v$session s, v$process p
where p.addr = s.paddr
and s.sid in (select sid from v$lock where type = 'TX');

使用道具 举报

版主

版主

精华贴数
3
技术积分
9663
社区积分
197
注册时间
2001-10-9
论坛徽章:
23
ITPUB元老
日期:2005-02-28 12:57:002011新春纪念徽章
日期:2011-01-25 15:41:012011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-02-18 11:43:33ITPUB年度最佳技术回答奖
日期:2011-04-08 18:37:39现任管理团队成员
日期:2011-05-07 01:45:08ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412011新春纪念徽章
日期:2011-01-04 10:24:02ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51
发表于 2009-1-22 22:19:55 |显示全部楼层
原帖由 viadeazhu 于 2009-1-21 22:37 发表
好老的帖子啊,我才发了SR 7372626.992,oracle已经基本确定为bug。


We can't view your SR. But can you tell us the bug number?

Yong Huang

使用道具 举报

版主

不知(Dber)道僧

精华贴数
4
技术积分
6830
社区积分
350
注册时间
2008-2-20
论坛徽章:
43
ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04生肖徽章2007版:兔
日期:2011-01-20 12:58:492011新春纪念徽章
日期:2011-01-04 10:38:212010广州亚运会纪念徽章:棒球
日期:2010-11-12 16:43:50ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51设计板块每日发贴之星
日期:2010-08-25 01:01:01月度精华徽章
日期:2010-05-01 02:15:422010年世界杯参赛球队:加纳
日期:2010-04-25 12:19:13数据库板块每日发贴之星
日期:2010-04-19 01:01:012011新春纪念徽章
日期:2011-01-25 15:41:01现任管理团队成员
日期:2011-05-07 01:45:082010广州亚运会纪念徽章:排球
日期:2011-04-27 13:27:19
发表于 2009-1-22 23:05:26 |显示全部楼层
学习了
不知道僧态度:知之为知之不知为不知,是知也。探索不知 是道僧态度。
追求的心态:临渊羡鱼,不如退而结其网
MSN:ora_dber@hotmail.com
http://xsmdel.itpub.net

使用道具 举报

注册会员

大表哥(Watch Jiang)

精华贴数
2
技术积分
10948
社区积分
77
注册时间
2005-12-29
论坛徽章:
39
授权会员
日期:2007-03-30 13:57:462011新春纪念徽章
日期:2011-02-18 11:43:322010广州亚运会纪念徽章:游泳
日期:2011-03-09 17:50:392010广州亚运会纪念徽章:垒球
日期:2011-05-20 22:23:57灰彻蛋
日期:2011-05-25 08:49:23数据库板块每日发贴之星
日期:2011-06-01 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-29 09:48:25双黄蛋
日期:2011-07-18 14:09:35紫蛋头
日期:2011-08-03 19:10:40ITPUB季度 技术新星
日期:2011-08-31 15:27:58鲜花蛋
日期:2011-09-02 13:11:58鲜花蛋
日期:2011-11-30 14:13:01
发表于 2009-1-22 23:11:50 |显示全部楼层
bug 7832504
11g upgrade
Infinity I/O SAN Bootcamp
O'Reilly.Mastering.Perl,Intermediate.Perl
mysql......
oracle on linux!!

使用道具 举报

版主

小V

精华贴数
6
技术积分
9712
社区积分
2806
注册时间
2008-8-22
论坛徽章:
101
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512011新春纪念徽章
日期:2011-01-04 10:24:022011新春纪念徽章
日期:2011-01-25 15:41:012011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-02-18 11:42:50现任管理团队成员
日期:2011-05-07 01:45:08ITPUB官方微博粉丝徽章
日期:2011-06-28 19:45:36ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53
发表于 2009-1-22 23:55:10 |显示全部楼层
原帖由 Yong Huang 于 2009-1-22 22:19 发表


We can't view your SR. But can you tell us the bug number?

Yong Huang



BUG Reference 7832504

使用道具 举报

相关内容推荐
您需要登录后才可以回帖 登录 | 注册

TOP技术积分榜 社区积分榜 徽章 电子杂志 团队 统计 邮箱 虎吧 老博客 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档 | IT博客
CopyRight 1999-2011 itpub.net All Right Reserved. 北京皓辰网域网络信息技术有限公司版权所有 联系我们 网站律师 隐私政策 知识产权声明
京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:1101082001 广播电视节目制作经营许可证:编号(京)字第1149号
  
回顶部