1

I got this error when trying to run a query in SQL server query analyzer. What is the reason?

Chilledrat
  • 2,593
  • 3
  • 28
  • 38
user29982
  • 443
  • 4
  • 9
  • 14

2 Answers2

1

If you're using cursors, then you've probably closed the cursor. Check out MSDN for more information (http://support.microsoft.com/kb/151693)

If you're not using cursors, then it could be an issue with the server, check the log.

Josef
  • 7,431
  • 3
  • 31
  • 33
0

And before it's lost to the sands of time, the KB article:


Article ID: 151693 - Last Review: October 3, 2003 - Revision: 3.0

FIX: Err Msg "Unknown Token Received from SQL Server"

Symptoms

When you set the statement options to use a server-side cursor and prepare a select statement on a SQL Server system table, the first execution of the select creates the cursor successfully. After you close this cursor, if you execute the prepared statement again, the following error message appears:

unknown token received from SQL Server.

Workaround

Use a forward-only cursor instead of a static, keyset, or dynamic cursor on the system tables. Note that the problem does not occur if a server-side cursor is created on a user-defined table or view.

If a forward-only cursor is unacceptable, prepare the select statement again on the system table and execute it to create a server-side cursor. Note that the first execution works fine and applications typically do not need to create a cursor on a system table repeatedly.

Status

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.50.0201. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219