<p>I'm getting a <strong><code>Connection Busy With Results From Another Command</code></strong> 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?</p>

[{'answer_id': 40105, 'author': 'Craig', 'author_id': 2894, 'author_profile': 'https://Stackoverflow.com/users/2894', 'pm_score': 2, 'selected': True, 'text': '<p><a href="http://support.microsoft.com/kb/822668" rel="nofollow noreferrer">Microsoft KB article 822668</a> is relevant here:</p>\n\n<blockquote>\n  <h2>FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query</h2>\n  \n  <h3>Symptoms</h3>\n  \n  <p>Under stress conditions, you may receive the following error message when you perform linked server activity:</p>\n\n<pre><code>Server: Msg 7399, Level 16, State 1, Procedure &lt;storedProcedureName&gt;, Line 18 OLE DB provider \'SQLOLEDB\' reported an error. \nOLE/DB Provider \'SQLOLEDB\' ::GetSchemaLock returned 0x80004005:\n\nOLE DB provider SQLOLEDB supported the Schema Lock interface, but returned 0x80004005 for GetSchemaLock .]. \nOLE/DB provider returned message: Connection is busy with results for another command \nOLE DB error trace [OLE/DB Provider \'SQLOLEDB\' ::CreateSession returned 0x80004005.\n</code></pre>\n  \n  <p><strong>Note</strong> The OLE DB source of the error may vary. However, all variations of the error message include the text "Connection is busy with results for another command".</p>\n  \n  <h3>Resolution</h3>\n  \n  <p>To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000.</p>\n</blockquote>\n\n<p>As noted there, the problem was first corrected in SQL Server 2000 Service Pack 4.</p>\n\n<p><a href="https://web.archive.org/web/20071124140051/http://bisqlserver.blogspot.com/2007/02/issues-transferring-data-back-and-forth.html" rel="nofollow noreferrer">This blog post</a> by Mark Meyerovich, a Senior Software Engineer at RDA Corp, also provides some insight (now archived, because the original link went dead):</p>\n\n<blockquote>\n  <p><strong>SQL Server service pack upgrade</strong></p>\n  \n  <p>A quick search on Google turns up the following article (<a href="http://support.microsoft.com/kb/822668" rel="nofollow noreferrer">http://support.microsoft.com/kb/822668</a>):\n  FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query.</p>\n  \n  <p>It basically implies the issue is a bug and recommends an upgrade to Service Pack 4. We have started out with SQL Server 2000 SP3 and we do have some linked servers in the equation, so we give it a try. After the upgrade to SP4 – same result.</p>\n</blockquote>\n'}, {'answer_id': 2173947, 'author': 'Dave Markle', 'author_id': 24995, 'author_profile': 'https://Stackoverflow.com/users/24995', 'pm_score': 4, 'selected': False, 'text': '<p>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 \n"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.  </p>\n\n<p>You can enable MARS by opening the connection properties, and clicking "All", and scolling down in Management Studio.</p>\n\n<p>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.</p>\n'}, {'answer_id': 17923000, 'author': 'OZ_', 'author_id': 680786, 'author_profile': 'https://Stackoverflow.com/users/680786', 'pm_score': 2, 'selected': False, 'text': '<p>If somebody met this annoying bug while using PHP PDO with ODBC, then use <code>closeCursor()</code> method after query execution.</p>\n'}, {'answer_id': 28130401, 'author': 'smozgur', 'author_id': 3115000, 'author_profile': 'https://Stackoverflow.com/users/3115000', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n\n<p>You need to set MARS_Connection in /etc/odbc.ini as following:</p>\n\n<pre><code>[ConnName]\nDriver=ODBC Driver 11 for SQL Server\nServer=192.168.2.218,1433\nDatabase=DBNameHere\nMARS_Connection=yes\n</code></pre>\n\n<p>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.  </p>\n'}, {'answer_id': 43854950, 'author': 'marcob', 'author_id': 7982355, 'author_profile': 'https://Stackoverflow.com/users/7982355', 'pm_score': 0, 'selected': False, 'text': '<p>Just for information if somebody else have the problem. I tried connecting via NetCobol of Fujitsu on an SQLEXPRESS via ODBC with embedded sql and to solve the problem I had to change a value in the registry namely </p>\n\n<pre><code>\\HKLM\\Software\\ODBC\\ODBC.INI\\MyDSN\n</code></pre>\n\n<p>with MyDSN as a string value:</p>\n\n<pre><code>Name - MARS_Connection\nValue - Yes\n</code></pre>\n\n<p>I just put the information here if it can help.</p>\n'}]
['https://Stackoverflow.com/questions/39928', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2978/']