Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix native client error 'Connection is busy with results for another command'?

I'm getting a Connection Busy With Results From Another Command error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?

like image 296
Matt Large Avatar asked Sep 02 '08 16:09

Matt Large


People also ask

What is Native Client in SQL Server?

What Is SQL Native Client? Microsoft SQL Server Native Client (SQL Native Client) contains the SQL ODBC driver and SQL OLE DB provider in one native dynamic link library (DLL) supporting applications using native-code APIs (ODBC, OLE DB, and ADO) to Microsoft SQL Server.

How do I check my native client version?

Method 1: On the system where you want to find the version of Native Client, start the ODBC Administrator (odbcad32.exe), and then check the Version column under the Drivers tab.

What is native client used for?

SQL Server Native Client can be used to create new applications or enhance existing applications that need to take advantage of features introduced in SQL Server 2005 (9. x), such as multiple active result sets (MARS), user-defined data types (UDT), query notifications, snapshot isolation, and XML data type support.


2 Answers

As I just found out, this can also happen on SQL 2005 if you do not have MARS enabled. I never even knew that it was disabled by default, but it is. And make sure you are using the "NATIVE OLEDB\SQL Native Client" connection type. If you're using the "OLEDB.1" type connection (or whatever...) MARS is not even an option, and you get the SQL 2000 behavior, which is nasty.

You can enable MARS by opening the connection properties, and clicking "All", and scolling down in Management Studio.

I know your question has long since been answered, but I'm just throwing this in for the next sucker like me who gets burned by this.

like image 140
Dave Markle Avatar answered Oct 19 '22 13:10

Dave Markle


Had this error today with MS ODBC Driver 11 for SQL Server for Linux to SQL Server connection. Wanted to help next searcher considering this was the first Google search result when I made the search.

You need to set MARS_Connection in /etc/odbc.ini as following:

[ConnName]
Driver=ODBC Driver 11 for SQL Server
Server=192.168.2.218,1433
Database=DBNameHere
MARS_Connection=yes

Speaking of MS ODBC Linux Driver: It is a complete PITA to deal with it but I insisted using native solution. I experienced too many walls especially working with ZF2, however, every trouble has a solution with the driver I can say. Just to encourage people using it instead quickly give up.

like image 33
smozgur Avatar answered Oct 19 '22 13:10

smozgur