cursors status
1 Find out the cursors that are allocated but not opened or closed
01.--Method 1 02. 03.select name from sys.dm_exec_cursors(0) where is_open =004. 05. 06.--Method 207. 08.select09. cur.cursor_name 10.from11. sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle12.where13. cur.open_status =02 Find out the cursors that are opened and not closed
01.--Method 102. 03.select name from sys.dm_exec_cursors(0) where is_open =104. 05. 06.--Method 207. 08.select09. cur.cursor_name 10.from11. sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle12.where13. cur.open_status =13 Find out the cursors that are allocated but not deallocated
01.--Method 102. 03.select name from sys.dm_exec_cursors(0) 04. 05. 06.--Method 207. 08.select09. cur.cursor_name 10.from11. sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle
0 comments:
Post a Comment