Queries are from Mars, Men are from Venus

Jun 10, 2010

I always thought that Mars was a planet, but apparently it also has to do with multiple pending requests within a single SQL Server connection.  MARS (Multiple Active Result Sets) was introduced in SQL Server 2005 and provided the ability to handle these multiple requests.  Like

Apparently this isn't the only Mars out there

Apparently this isn't the only Mars out there

anything else, though, it has to be used correctly.

 

About a week ago, I started seeing the following error on one of my servers:

 

DESCRIPTION:  The server will drop the connection, because the client driver has sent multiple requests while the session is in single-user mode. This error occurs when a client sends a request to reset the connection while there are batches still running in the session, or when the client sends a request while the session is resetting a connection. Please contact the client driver vendor.

 

After digging around and talking to some of the developers in house, I found that they were making use of MARS, but not always correctly.  To avoid the error above,  ”MultipleActiveResultSets=True” needs to be added to the connection string.  Adding that seems to have fixed the issues.

Share with others

No Responses so far | Have Your Say!

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree Plugin