A
A
Alexey Lebedev2015-03-22 16:29:08
SQL
Alexey Lebedev, 2015-03-22 16:29:08

How to make a unique transaction (which will not be repeated)?

SET XACT_ABORT ON;
BEGIN TRAN UN_name-141242141515151235566451;
...
IF @@ERROR = 0  COMMIT TRAN UN_name-141242141515151235566451 
ELSE 
ROLLBACK TRAN UN_name-141242141515151235566451;

You need to make sure that the transaction with UN_name-141242141515151235566451 is executed once an hour. A retransaction with this name was blocked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2015-03-22
@index0h

UUID?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question