Max
Max

Reputation: 27

How many stored procedure calls per transaction?

I guess it's a bit rude to ask this question, as I should make an effort (more than googling) to figure it out myself, but maybe some one knows the answer off the top of his head.

How many stored procedure calls are made per transaction (MS SQL 2005/2008)? Say, I created a stored procedure which triggers on inserts and from within a Java application, I commit only once all the insert statements were sent. Does the stored procedure trigger at every insert or only after I commit? Or does it depends on how I set up the stored procedure?

Cheers, Max

Upvotes: 0

Views: 386

Answers (1)

bobs
bobs

Reputation: 22224

The trigger will fire once for each INSERT statement. So, the stored procedure will run each time the trigger runs. The number of executions is not related to when a transaction is committed.

Upvotes: 1

Related Questions