Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

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

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 8, 2014 12:23 AM
Points: 14, Visits: 88
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


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 5:37 AM
Points: 15,662, Visits: 28,054
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

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

Add to briefcase

Permissions Expand / Collapse