Replication - SQL Adaptive Server Enterpise to SQL Adaptive Server Anywhere

We are going to be installing AS Enterprise in home office and AS Anywhere
in the field.  We would like to use an autoincrement key on some tables.  Is
there a good way to avoid duplicate keys.  Also, are there any pitfalls to
using the two different servers for replication.

TIA

Fred.


0 fdefranco 5/26/1999 1:37:13 PM
You cannot take advantage of the special IDENTITY data type when
creating a replication definition with an ASA db as the subscriber.  If
you try this, replication of inserts from ASE to ASA will fail, because
the rep server will try to issue a "set identity_insert tablename on"
command to the ASA (This is how v11.0.2 of rep server works).  This is
an invalid command to ASA.  

The workaround is to define the identity column as type "numeric" in the
replication definition for the ASE table.  ASA will accept inserts using
this form of the repdef.
0 Tom 5/26/1999 4:26:08 PM
I don't think you should ever use "identity" or "autoincrement" defaults
when replicating.  To avoid duplicate primary key problems you should be
using primary key pools.

Save the pain retro-fitting now and design it with replication in mind.

See the Help file:
  Data Replication with SQL Remote
    PART 2.  Replication Design for SQL Remote
      CHAPTER 7.  SQL Remote Design for Adaptive Server Anywhere
        Ensuring unique primary keys

 Primary key pool summary


--
David Fishburn
Sybase
Please only post to the newsgroup


Tom Iarusso wrote in message <374C20A0.5D36@nu.com>...
>You cannot take advantage of the special IDENTITY data type when
>creating a replication definition with an ASA db as the subscriber.  If
>you try this, replication of inserts from ASE to ASA will fail, because
>the rep server will try to issue a "set identity_insert tablename on"
>command to the ASA (This is how v11.0.2 of rep server works).  This is
>an invalid command to ASA.
>
>The workaround is to define the identity column as type "numeric" in the
>replication definition for the ASE table.  ASA will accept inserts using
>this form of the repdef.


0 David 5/26/1999 7:41:02 PM
Take a look at:

---------------------------------------------------------------
  Data Replication with SQL Remote
    PART 2.  Replication Design for SQL Remote
      CHAPTER 7.  SQL Remote Design for Adaptive Server Anywhere

 Ensuring unique primary keys
--------------------------------------------------------------------

    The same concepts apply to ASE as apply to ASA.

--

---------------------------------------
Rob Waywell
Sybase
Please Respond to Newsgroups

fdefranco wrote in message ...
>We are going to be installing AS Enterprise in home office and AS Anywhere
>in the field.  We would like to use an autoincrement key on some tables.
Is
>there a good way to avoid duplicate keys.  Also, are there any pitfalls to
>using the two different servers for replication.
>
>TIA
>
>Fred.
>
>


0 Rob 5/26/1999 7:46:54 PM
Reply:

(Thread closed)