SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Un committed Transaction


Un committed Transaction

Author
Message
murthysundara
murthysundara
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 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.
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)SSC Guru (102K reputation)

Group: General Forum Members
Points: 102325 Visits: 33014
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 and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search