SQL Open Cursors Test
Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time.
If cursors executing on a Microsoft SQL server take too long a time to execute, it could drain critical server resources, and could severely hamper server performance. With the help of this test, you can easily track the number of cursors that each application is executing on the Microsoft SQL server and the time they take to execute, so that resource-intensive cursors and the applications executing them can be isolated.
This test has been disabled by default for this layer. To enable this test, go to the enable / disable tests page using the menu sequence : Agents -> Tests -> Enable/Disable, pick Microsoft SQL as the Component type, Performance as the Test type, choose this test from the disabled tests list, and click on the << button to move the test to the ENABLED TESTS list. Finally, click the Update button.
Note:
This test is applicable only to Microsoft SQL Server 2005 (and above).
Target of the test : A Microsoft SQL server
Agent deploying the test : An internal agent
Outputs of the test : One set of results for each application that is executing cursors on the Microsoft SQL server instance being monitored
|
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Number of cursors: |
Indicates the total number of cursors that this application is currently executing on the server. |
Number |
Compare the value of this measure across applications to know which application is executing the maximum number of cursors on the server. Use the detailed diagnosis of this measure to know the details of the cursors. This includes the name of each cursor, which user created the cursor, when, how long has it been since the cursor was created, the number of disk reads and writes performed by the cursor, and the worker time of the cursor. Long running cursors and I/O intensive cursors can thus be isolated. |
Avg cursor opentime: |
The average time for which this application was executing cursors on the server. |
Seconds |
Ideally, the value of this measure should be low. A high value indicates that the cursors executed by this application have been running for too long a time on the server; besides eroding server resources, this phenomenon can greatly degrade server performance. Compare the value of this measure across applications to identify which application is executing long running cursors. |
Max cursor opentime: |
Indicates the maximum time for which cursors executed by this application have remained open. |
Seconds |
|