I have 2 sp's, SP 'B' is called after SP 'A'. SP 'A' delete's the data from Table XYZ,Then SP B Insert's Data in Table XYZ. Suppose, due to some exception SP 'B' fails then I have implemented a logic which will rollback the transaction's. But the challenge is SP 'A' has ran already and it has deleted the data from Table XYZ. Ultimately I am left with no data. How can be avoid loosing data? how to implement automic operation. Cant Merge 2 Sp's in 1, both run's on the basis of conditions..