The server allows RPCs to be included within the unit of work initiated by the current transaction.
Before using transactional RPCs, issue the set transactional_rpc on command.
begin transaction insert into t1 values (1) update t2 set c1 = 10 execute @status = big_server.pubs2.dbo.myproc if @status = 1 commit transaction else rollback transaction
In this example, the work performed by the procedure myproc in server big_server is included in the unit of work that began with the begin transaction command. This example requires that the remote procedure myproc return a status of “1” for success. The application controls whether the work is committed or rolled back as a complete unit.
The server that is to receive the RPC must allow RPCs to be included in the same transactional context as Data Manipulation Language (DML) commands (select, insert, delete, update). This is true for SAP ASE and is expected to be true for most DirectConnect products released by SAP. However, some database management systems may not support this capability.