Date parsed: 22/10/2007 13:56:44
Date: Mon, 22 Oct 2007 10:56:44 +0300
I'm not sure I completely understand your question, however you may want to
take a look at the following stuff.
Check out ROLLBACK TRAN
http://msdn2.microsoft.com/en-us/library/ms181299.aspxand TRY ... CATCH (SQL 2005 only)
http://msdn2.microsoft.com/en-us/library/ms175976.aspx--
Ekrem Önsoy
"valentin tihomirov" <V_tihomirov@best.ee> wrote in message
news:eNi74gCFIHA.3400@TK2MSFTNGP03.phx.gbl...
> The code is
>
> proc1
> begin tgan
> insert
> exec proc2
> commit tran
> end
>
> proc2
> begin tran
> commit tran
> exec proc3 -- do not want to it be in the proc1's tran
> end
>
> The desire is to escape the execution of proc3 from the transaction
> started by proc1.
>
> If you like, the apology for the decision is: The proc3 does some complex
> things (a couple of records are inserted, deleted, updated). This must be
> done 1) atomically (all or nothing) but the operations are 2) expensive
> and 3) must always commit. So, for performance reasons, I have decieded to
> do it transceding the transaction. In case of failure, which may happen
> only because of system shut down, the state can be restored manually.
>