Article ID: 295006 - View products that this article applies to.
This article was previously published under Q295006
BUG #: 353107 (SHILOH_BUGS)
When the OSQL utility is used to execute a query that is longer than 1002 characters, an incorrect error message may be returned:
The correct error message should be the following:
Msg 3909, Level 16, State 1, Server Server_Name, Procedure sp_bindsession, Line 0
Session binding token is invalid.
Input query is too long
The input buffer for the OSQL utility is limited to 1002 characters.
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/290211/EN-US/ )INF: How to Obtain the Latest SQL Server 2000 Service Pack
To work around this problem, you can do the following:
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
This problem does not occur on Microsoft Windows 95 and Windows 98 because these operating systems cannot handle a command-line argument that is greater than 1002 characters. If an argument of that length is specified at the command prompt, or in a batch file, it is truncated by the operating system.
Contact us for more help
Connect with Answer Desk for expert help.