Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I also believe that we all can contribute to each other's growth by sharing knowlege and experiences. I would love to take my skills and help people around the world solve problems..."

Geography

Where in the world do Tek-Tips members come from?
DBAWinnipeg (Programmer)
30 Apr 04 14:31
Can someone please give me the low-down on this command.

I'm running a SQL Trace (duration) and 90% of my long running queries are using this command

Any ideas?

Thanks in advance!!!

Colin in da 'Peg :)

dmcmunn (Programmer)
30 Apr 04 23:08
Looks like it's one of several API-specific (ODBC, OLE DB, etc...) system function for...handling a cursor

MSDN has this to say about that...

API System Stored Procedures

Users running SQL Profiler against ADO, OLE DB, ODBC, and DB-Library applications may notice the use of system stored procedures that are not covered in the Transact-SQL Reference. These stored procedures are used by the Microsoft OLE DB Provider for SQL Server, the SQL Server ODBC driver, and the DB-Library dynamic-link library (DLL) to implement the functionality of a database API. These stored procedures are simply the mechanism the provider or drivers use to communicate user requests to SQL Server. They are intended only for the internal use of the OLE DB Provider for SQL Server, the SQL Server ODBC driver, and the DB-Library DLL. Calling them explicitly from an SQL Server application is not supported.

The complete functionality from these stored procedures is made available to SQL Server applications through the API functions they support. For example, the cursor functionality of the sp_cursor system stored procedures is made available to OLE DB applications through the OLE DB API cursor properties and methods, to ODBC applications through the ODBC cursor attributes and functions, and to DB-Library applications through the DB-Library Cursor Library.

These system stored procedures support the cursor functionality of ADO, OLE DB, ODBC, and the DB-Library Cursor Library:

sp_cursor sp_cursorclose sp_cursorexecute
sp_cursorfetch sp_cursoropen sp_cursoroption
sp_cursorprepare sp_cursorunprepare
nigelrivett (IS/IT--Management)
1 May 04 1:00
Believe that is when a client is creating a cursor.
It creates a cursor then fetches the data from it. You will often find spid stuck on a cursorfetch if the clint is very slow at receiving the data.
You should find in the trace the query that is being used to create the cursor.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close