Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Will I be blocked?

Author  Topic 

tutufool
Starting Member

14 Posts

Posted - 2007-01-31 : 03:41:24
Suppose I have a table called Account, Columns are:
AccountId, AccountBalance, UserId ........

And I have a batch application run at back-end to do:
list = get a user list;
foreach(user in list)
do
{
begin trans
1,get all the accounts for the user
2,update accountBalance according to some logic (coule be 1 or 2 seconds)
commit or rollback
}
(this batch app proberbly use jdbc with default lock policy: READ_COMMITTED)

At the same time, I have web UI which could let user create account in account table.(only INSERT)

my question is:
if I want to create another account in web UI, is there any chance I will be locked (blocked) when the back-end app is running?

I've heard that INSERT and SELECT will not be blocked for the row level lock of sql server, but someone tell me sql server will do performance turning itself, so it will proberbly use a table level lock sometime.

All I want to make sure is if we can let the web user never feel blocked when he is creating an account.

it's hard for me to describe it well, but I really appreciate your helps!

thanks


SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-31 : 03:44:58
Duplicate post
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78353


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2007-01-31 : 04:14:25
This is the most relevant forum, I'll lock the other one.


Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2007-02-01 : 02:20:35
Why don't you just try it out and see for yourself in your test environment?
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2007-02-01 : 04:16:47
quote:
Originally posted by LoztInSpace

Why don't you just try it out and see for yourself in your test environment?



That's crazy talk!

Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page
   

- Advertisement -