Global transactions allow an application to modify data managed by different resource managers within a single unit of work. The Recoverable Resource Manager Services (RRS) component of z/OS manages the unit of work for the application and coordinates the activities of the participating resource managers. DB2 participates as a resource manager in global transactions, as do MQ Series, IMS, and other products. When using a global transaction, an application needs to use interfaces defined by RRS to commit or roll back work. These transactions will be identified via a tokenglobal transaction ID, or XID.
Within DB2, global transactions allow several processes to share locks if they are all participants in a unit of work. The larger unit of work is referred to as a global transaction. This provides a way to avoid deadlocks between separate threads that are part of the same work unit.
The sharing of locks is limited to normal transaction locks and an explicit LOCK TABLE statement, or partition-key updates could still cause deadlocks or timeouts. Many design issues need to be considered prior to the use of global transactions, and there are also additional risks and exposures.