Using SQL Server from .NET, is it possible (using the same or separate connections) to read both the underlying data as well as the as-yet uncommitted changes from another separate connection?
For example:
I have Connection1, which starts a transaction and inserts a record with Id == 1 into a table but doesn’t commit it
From Connection2, I would like to read the table without that row existing
From Connection2 or Connection3, I would like to read the table with the row existing.
Yes, you need to enable dirty reads aka READ UNCOMMITTED
Edit:
To read both sets of data you’d need a combination of “snapshot isolation” in one connection and “read uncommitted” in another.
YMMV. It isn’t something…