Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Remote » SQL Remote Installation Design » Ensuring unique primary keys » Using primary key pools

The primary key pool table Next Page

Replicating the primary key pool


You can either incorporate the key pool into an existing publication or share it as a separate publication. In this example, you create a separate publication for the primary key pool.

To replicate the primary key pool (SQL)
  1. Create a publication for the primary key pool data.

    CREATE PUBLICATION KeyPoolData (
       TABLE KeyPool SUBSCRIBE BY location
    );
  2. Create subscriptions for each remote database to the KeyPoolData publication.

    CREATE SUBSCRIPTION
    TO KeyPoolData( 'user1' )
    FOR user1;
    CREATE SUBSCRIPTION
    TO KeyPoolData( 'user2' )
    FOR user2;
    ...

    The subscription argument is the location identifier.

  3. In some circumstances it makes sense to add the KeyPool table to an existing publication and use the same argument to subscribe to each publication. This example keeps the location and rep_key values distinct to provide a more general solution.

    See also