twophase.c sample program

The twophase.c commit performs a simple update on two different servers. See the source code for the exact contents of the update. After you have run the sample, use isql on each server to determine whether the update actually took place.

This sample requires that you have Adaptive Server running on two different servers, named SERVICE and PRACTICE, each containing the pubs2 database. If your servers are named differently, replace SERVICE and PRACTICE in the source code with the actual names of your servers.

Before running the sample, make sure that your client can access both servers. See the Open Client and Open Server Configuration Guide for UNIX.

NoteIf the PRACTICE server is on a different machine than the SERVICE server, the PRACTICE server must be able to connect to the SERVICE query port.