简体   繁体   中英

How to access cursor state in SQL Server Management Studio

I am trying to debug an application that interacts with an SQL Server database. It does this in part using database cursors.

While stepping through the application I would like to see the state of a specific cursor using SQL Server 2012 Management Studio (which has a connection to the database in use).

How do I do this? Or is there some other tool with which I can do this?

select c.*
from sys.dm_exec_sessions s
cross apply sys.dm_exec_cursors(s.session_id) c

David

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM