asp.net mvc 4 - Can a SQL Server connection be reused on two different concurrent requests? -
our setup asp.net mvc using ninject , instantiate , open new connection on per request basis using same connection string every time. based on msdn article connection pooling reuse connections, wondering if it's possible connection in used on 1 request reused on concurrent request @ same exact time.
the reason question have query set isolation level
read uncommitted
run query , set was. since setting isolation level
@ connection level wondering if it's possible other requests reading "dirty" data during time frame when isolation read uncommitted
.
whenever connection placed pool, reset via call sp_reset_connection. unfortunately, not affect isolation level.
there complaints behavior here: https://connect.microsoft.com/sqlserver/feedback/details/243527/sp-reset-connection-doesnt-reset-isolation-level
if must change isolation level, i'm afraid you'll need to:
explicitly set isolation level on every query
use different connection string (preferably pooling disabled) when changing isolation level
move isolation level changes stored procedures
Comments
Post a Comment