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)
 multi cpu cause update errors?

Author  Topic 

yipchunyu
Yak Posting Veteran

80 Posts

Posted - 2004-07-19 : 05:28:57
Hi guys,
I have 1 dev server and 1 production server.
The DEV one has only 1 cpu and the production one has two cpu.
Everything runs fine in the dev environment. However, when the vb programs run in the production environment.
The program display that there's error that can't lock certain records (it happens when two different update statement to update the same record with different fields)

So, will multiple cpu cause erros? How to handle this?

JasonGoff
Posting Yak Master

158 Posts

Posted - 2004-07-19 : 05:49:52
Can you post sample code that is doing the updating ? Our SQL Server runs on an 8-way box and we don't experience issues like this...
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-07-19 : 06:20:18
2 update statement, from 2 different processes, trying to update the same row at the same time? Are they not deadlocking each other?

Run an SP_WHO2 when they problem occurrrs, and check the "BlkBy" column for those processes. I would EXPECT one of them to block the other, until it commits, and if they are doing multiple tables in a transaction, I could see them deadlocking.

CiaO

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-19 : 08:08:21
You could also set up Profiler to see what's causing it. Track deadlock chains to see if the deadlocks that Ciao was talking about is happening.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-07-19 : 08:17:03
*grin*

Derrick, Ciao is Italian for Hello, or Goodbye (as I understand it).

CiaO is just my variation thereof...Not my name

CiaO


*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-19 : 08:18:42
Ahhhhh, well I'm an illiterate American you have to remember. :) How many times have I called you Ciao? lol

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-07-19 : 08:29:33
First time I noticed it...
... but then I'm a South African - it takes a while for things to pierce the skin, let alone the skull

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2004-07-19 : 15:09:31


It is a rich creamy color with a high fat content of 5-7 percent. Being so high in fat, it is usually processed into butter, cheese, or yogurt. An average cow will produce 110 kg. Milk in a lactation period of an average of 149 days
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-07-19 : 15:48:10
quote:
Originally posted by yipchunyu

The program display that there's error that can't lock certain records


HUH?


quote:
it happens when two different update statement to update the same record with different fields



That shouldn't matter 1 bit....SQL Server manages it, and will either wait for it, or timeout, HOWEVER, it seemas like you probably have a program that does the update, starts an independant thread, trying to do another update, thereby causing a block, and the thread doesn't return...

The more CPU's the better...but more memory is even better...

Where's the code...



Brett

8-)
Go to Top of Page
   

- Advertisement -