I want to do the following:
Execute a stored procedure that starts a transaction, and from within that stored procedure call another stored procedure that is outside transaction.
The easiest to explain this is with a logging example (my situation is slightly different but it's the same principle)
So, from within a transaction writing a log to another table. However, when my procedure fails, all logging is gone because the transaction is rolled back.
The following example is an example (don't shoot me if it's not valid tsql)
CREATE PROCEDURE usp_X
INSERT INTO TABLE1 VALUES (NEWID(), 'abc')
exec usp_LogEvent('record created'
CREATE Procedure usp_LogEvent
View Complete Post