c# - SQL Server database is set Multi-User Mode and return error Single-User Mode -


My database is always set in multi-user mode, in my connection string mars = true Option, but after checking the database error log, I can often see this error message

The server will leave the connection because the client driver has multiple requests While the session is in single-user mode this error occurs when Batches sends a request while the session to reset the Oi customer connection is still sends running, or request the client sends a connection. Please contact the customer driver vendor.

I do not know what I forget to activate the multi-user mode .... I try to activate multi-user mode because it is best < / P>

Some friends have advised to use MARS = false and multi-user mode

Is this a good idea?

Connection String

  & lt; Add name = "BaseIntext" connection string = "metadata = res: //*/BaseModel.csdl|res://*/WMSModel.ssdl|res://*/BaseModel.msl;&#####; Provider = System.Data.SqlClient; Provider Connection String = & Amp; quot; Data Source = MySace; & amp; #xD; & #xA; Initial Catalog = Mime Database; Security Information Continued = True; User Id = myuser; password = mypassword; & amp; #xD; & amp; #xA; multipleactive serialset = true; application name = EntityFramework & amp; quot; "provider name =" System.Data.EntityClient "/>  

Check DB after user-mode, select

  from sys.databases where user name = 'MyDatabase' > 

Return MULTI_USER

I use C #, Unit Framework 4.X, SQL Server 2008

Thanks for your attention

delete error log after a few days Solution 2 ways to set this option know: Select administrator in SQL Management - > Options


Comments