none
open cursors RRS feed

  • Question

  • How can you check your SQL Server environment to see if you have open cursors configured on your system?
    Friday, November 14, 2008 9:09 PM

Answers

  •  

    What about:

    Code Snippet
    SELECT reference_name, cursor_name, cursor_scope,
         status, model, concurrency, scrollable,
         open_status, cursor_rows, fetch_status,
         column_count, row_count, last_operation,
         cursor_handle
        FROM sys.syscursorrefs scr, sys.syscursors sc
        WHERE  scr.cursor_handl = sc.cursor_handle

     

     

     

    Jens K. Suessmeyer

    Saturday, November 15, 2008 2:00 PM
    Moderator

All replies

  •  

    What about:

    Code Snippet
    SELECT reference_name, cursor_name, cursor_scope,
         status, model, concurrency, scrollable,
         open_status, cursor_rows, fetch_status,
         column_count, row_count, last_operation,
         cursor_handle
        FROM sys.syscursorrefs scr, sys.syscursors sc
        WHERE  scr.cursor_handl = sc.cursor_handle

     

     

     

    Jens K. Suessmeyer

    Saturday, November 15, 2008 2:00 PM
    Moderator
  • Not sure if that helps, looks like it lists actual cursors in the system at point of execution.
    Our software vendor asked if we set the parameter "open cursors". They are telling us that MS recommends that it be set to 0.   I know in Oracle there is a max_cursors db parmameter.
    Saturday, November 15, 2008 3:45 PM