免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3666 | 回复: 2
打印 上一主题 下一主题

Cursor in sp_who and sp_lock [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-06 18:07 |只看该作者 |倒序浏览
I have a long-running transaction in my application which include "Cursor", the question is, I can not find out the exactly "Cursor" in the transation because it's provided by a third-party vendor.

So I ran sp_lock and sp_who, outout as below:

-- sp_lock
fid spid loid locktype table_id page row dbname class context
----------- ----------- ----------- -------- ----------- ----------- ----------- ------ ----- -------
0 435 870 Sh_intent 23 0 0 yest Non Cursor Lock
0 435 870 Sh_intent 24 0 0 yest Non Cursor Lock
0 435 870 Sh_intent 1533504690 0 0 yest Cursor Id 28508161
0 435 870 Sh_intent 1565504804 0 0 yest Cursor Id 28508161


-- sp_who

fid spid status loginame origname hostname blk_spid dbname cmd block_xloid
----------- ----------- ------ -------- -------- -------- -------- ------ --- -----------
0 435 running actuate actuate cs2 0 yest OPEN CURSOR 0



Is it possible to find out what's "Cursor Id 28508161"?

I've tried dbcc sqltext(435) but the result is not what I want, anybody help? Many thank!

论坛徽章:
1
2017金鸡报晓
日期:2017-01-10 15:19:56
2 [报告]
发表于 2008-05-06 21:56 |只看该作者
dbcc cursorinfo(NULL,<cursor id>,<spid of owner>)     12.5的版本试了,可以。

论坛徽章:
0
3 [报告]
发表于 2008-05-07 21:12 |只看该作者

回复 #2 chuxu 的帖子

谢谢!很好用!

但这个dbcc 命令好像不是官方的 我在Sybase网站,文档里都找不到这个命令. 会不会有不好的影响?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP