In a procedure that is called fairly frequently I access another server which from time to time decides that my procedure is "deadlock victim", and kills my process. What I would like to do is to check if this occurs, wait a second or two to allow SQL server to deal with the dealock, and try again until I get my statements run. Now this is impossible (to my knowledge) without using a separate process (i.e using a dll or something to make the call). Is there a way you could do this in standard T-SQL?
Btw, 1205 is the code returned by TSQL when a process is judged to be a deadlock victim.
To examplify my problem, consider this pseudo-code which illustrates the above way of thinking:
create procedure ProcName