Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server: Trigger LOCKS? (DEADLOCK problem)
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQL Server: Trigger LOCKS? (DEADLOCK problem)
Miscellaneous
Thread ID:
00874797
Message ID:
00874797
Views:
137
Hi,

At some of my customers, i'm having problems with DEADLOCK problem.
We have a lot of triggers at some tables, with triggers a lot of SELECT and UPDATES.

I'm working with VFP 7.0, and my code is like this:

SQLEXEC(..., "BEGIN TRANSACTION")

lFlag = .t.
SELECT myRemoteView1
IF !TABLEUPDATE(.t., .t.)
lFlag = .f.
ENDIF
IF lFLag
SELECT myRemoteView2
IF !TABLEUPDATE(.t., .t.)
lFlag = .f.
ENDIF
ENDIF
IF lFlag
SQLEXEC(..., "COMMIT TRANSACTION")
ELSE
SQLEXEC(..., "ROLLBACK TRANSACTION")
ENDIF


Imagine that Tables from myRemoteView1 and myRemoteView2 have triggers that invoke a lot of Updates and Selects to other tables.

Since i invoked a transaction, what is SQL SERVER's work? Does he lock all the tables (or records?) existing in triggers?

Should i eliminate those "heavy" triggers and send their Select and Updates as single instructions from my application?


Thanks in advance.


Ricardo Almeida
Next
Reply
Map
View

Click here to load this message in the networking platform