O'Reilly logo

Guru's Guide to SQL Server Architecture and Internals, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Cursors

In addition to configuring cursors through declaration options, Transact-SQL also provides commands and configuration options that can modify cursor behavior as well. The sp_configure and sp_dboption procedures and the SET command can be used to configure how cursors are created and the way they behave once created.

Asynchronous Cursors

By default, SQL Server generates all keysets synchronously—that is, the call to OPEN doesn't return until the cursor's result set has been fully materialized. This may not be optimal for large data sets, and you can change it via the sp_configure 'cursor threshold' configuration option (cursor threshold is an advanced option; enable advanced options via sp_configure 'show advanced options' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required