Find all the stored Procedures that use a cursor in SQL Server using Query -
is possible list out stored procedures uses cursor in sql server using sql query. please advise me.
select * sys.sql_modules definition '%cursor %'
if looking open cursors ,you can use query:
select creation_time, cursor_id, name, c.session_id, login_name sys.dm_exec_cursors(0) c join sys.dm_exec_sessions s on c.session_id = s.session_id
Comments
Post a Comment