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

SAP Sybase SQL Anywhere 16.0 » SQL Remote » Creating SQL Remote systems » Duplicate primary key errors » Primary key pools

 

Replicating the primary key pool

Create a separate publication for the primary key pool and subscribe users to it.

Prérequis

The primary key pool table must already have been created.

Contexte et remarques

You can either incorporate the primary key pool into an existing publication or share it as a separate publication.

 Replicate the primary key pool
  1. On the consolidated database, 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( 'Sam_Singer' )
      FOR user1;
    CREATE SUBSCRIPTION
      TO KeyPoolData( 'user2' )
      FOR user2;
    ...

    The subscription argument is the location identifier.

Résultat

The primary key pool is replicated.

 See also