sp_getapplock without transaction

Viewed 6422

I'm implementing stored procedure that won't have transactions inside. Actually, it will, but only on specific spots to reduce time to minimum. Nature of stored procedure is so I only want one runinng at a time.

I tried to use sp_getapplock but quickly found that it needs to be inside transaction.

Is there any other alternative where I can place lock on whole procedure but without wrapping it into transaction?

1 Answers
Related