SQL Remote User's Guide
SQL Remote Design for Adaptive Server Anywhere
Ensuring unique primary keys
The primary key pool technique requires the following components:
Key pool table A table to hold valid primary key values for each database in the installation.
Replenishment procedure A stored procedure keeps the key pool table filled.
Sharing of key pools Each database in the installation must subscribe to its own set of valid values from the key pool table.
Data entry procedures New rows are entered using a stored procedure that picks the next valid primary key value from the pool and delete that value from the key pool.