Creating a Replication Definition

Create a replication definition to describe a replicated object. You can create replication definitions for databases, functions, or tables.

  1. Use isql to log in to Replication Server.
  2. Create a replication definition for the warm standby for table “t1”:
    create replication definition t1_ws_repdef
    with primary at pubs2a.pubs2s
    with all tables named t1
    (a integer, b char(10), c datetime)
    primary key (a)
    send standby replication definition columns
    replicate SQLDML
    go
    Replication definition ‘t1_ws_repdef’ is created.
    Note: To replicate using SQL statement replication, which is available only in Adaptive Server version 15.0.3 and later, use the replicate SQLDML clause.
  3. Update the row in table “t1”:
    update t1 set c = getdate()
    go
  4. Compare the trace output with the output that was generated before the replication definition was created:
    T. 2009/10/28 22:10:43. (138): Command(s) to
    'wingak1505i.pubs2':
    T. 2009/10/28 22:10:43. (138): 'begin transaction [0a]
    update dbo.t1 set a=1, b='first row', c='20091028
    22:10:42:383' where a=1 '

    The where clause in the update statement, now contains only column “a” because the replication definition specified that column “a”, uniquely identifies the row.

Related tasks
Tracing the Replication Server Transactions to Target Databases