Three important sp_cursoropen cursor

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

What is the three storage process﹖




The API server cursors SQL Server OLE DB provider,

SQL Server ODBC driver and DB-Library DLL to the server for cursor operations of these special system stored procedures.

The sp_cursoropen definition and the cursor and cursor options related to the SQL statement, and then generate the cursor.

Sp_cursorfetch from the cursor to extract one or more rows.

Sp_cursorclose closed and cursor.

Sp_cursoroption set cursor options.

Sp_cursor used to request the location update.

Sp_cursorprepare to compile and the related Transact-SQL statement or batch into the execution plan, but does not create a cursor.

Sp_cursorexecute created from the sp_cursorprepare created by the execution plan and fill the cursor.

Sp_cursorunprepare waste generated by the sp_cursorprepare execution plan.

These system stored procedure will be displayed in the ADO using API server cursors, OLE DB, ODBC and DB-Library application SQL Server profiler trace.

These records for SQL Server OLE DB SQL Server ODBC driver program, internal procedures and DB-Library DLL.

Complete functional applications can use these processes through the cursor function of the API database. In the application of process approach directly specified not supported.

When the SQL Server statement is executed in a connection, only completed or cancelled in all results from the first sentence, can perform other statements in connection.

When using API server cursors, this rule still holds, but from the perspective of the applications, like SQL Server in a connection has begun to support multiple active statement.

This is because the complete result set is stored in the server cursor, and only passed to the SQL Server statement to the sp_cursor system stored procedure execution.

SQL Server performs these stored procedures, and once the client retrieves the result set, it can begin to execute other statements.

OLE DB provider and ODBC driver are put before control returns to the application is to retrieve all the results from the sp_cursor stored procedure set.

This allows applications to interpolation of extraction operation in the multilevel active server cursor.

                    --by others Baidu space

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Spike at December 19, 2013 - 2:23 PM