Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server: Trigger LOCKS? (DEADLOCK problem)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SQL Server: Trigger LOCKS? (DEADLOCK problem)
Divers
Thread ID:
00874797
Message ID:
00874797
Vues:
138
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform