Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Un committed Transaction Expand / Collapse
Posted Friday, February 11, 2011 6:19 AM


Group: General Forum Members
Last Login: Friday, April 10, 2015 10:06 PM
Points: 14, Visits: 90
My Stock register table is given below

ID Date SysItem In OUt Balance
1 01/02/2011 10:00AM 100 150 150
2 01/02/2011 11:00AM 100 50 100

Now i am receiving 200 Nos of SysItem "100" at 01/02/2011 11:30 AM and transaction is not committed

I have to take current balance is 100 only at 01/02/2011 11:30 AM.

how to proceed.......

Advance thanks.

Post #1062510
Posted Friday, February 11, 2011 8:56 AM



Group: General Forum Members
Last Login: Yesterday @ 12:17 PM
Points: 17,173, Visits: 32,139
I'm not entirely sure I understand your question.

It sounds like you're saying that during inserts the area that you want to query is locked while the inserts are occurring and you want to know what options you have for reading the data? If that's wrong, let me know.

You should look at using Read Committed Snapshot as the isolation level for your database. That will allow you to still query the data while the inserts or updates are occurring. It does add to the tempdb, so be sure you've taken that into account.

"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server Query Performance Tuning
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1062640
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse