Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Cursor statuses

Sep 8 2009 3:50PM by Madhivanan   

Here are the queries that findout the cursors based on their statuses

1 Find out the cursors that are allocated but not opened or closed
--Method 1 

select name from sys.dm_exec_cursors(0) where is_open =0


--Method 2

select 
        cur.cursor_name 
from 
        sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle
where
        cur.open_status =0

2 Find out the cursors that are opened and not closed

--Method 1

select name from sys.dm_exec_cursors(0) where is_open =1


--Method 2

select 
        cur.cursor_name 
from 
        sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle
where
        cur.open_status =1

3 Find out the cursors that are allocated but not deallocated

--Method 1

select name from sys.dm_exec_cursors(0) 


--Method 2

select 
        cur.cursor_name 
from 
        sys.syscursorrefs as ref inner join sys.syscursors as cur on ref.cursor_handl=cur.cursor_handle

Tags: t-sql, sql_server, cursor_status, cursor,


Madhivanan
3 · 39% · 12472
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]