Creating replication definitions and subscriptions

After you enable and configure RTL, create replication definitions and subscriptions for the tables that you marked for replication to Sybase IQ.

  1. Create the repdef_testtab replication definition:

    create replication definition repdef_testtab
    with primary at ASE_DS.pdb1
    with primary table named ‘testtab’
    with replicate table named dbo.‘testtab’
    (c1 int, c2 int, c3 char(10))
    primary key(c1)
    go
    

    Add any required referential constraint clauses to the replication definitions to support RTL. See“Tables with referential constraints”.

  2. Create subscriptions to match each of the table and stored procedure replication definitions:

    create subscription sub_testtab for repdef_testtab
    with replicate at IQSRVR.iqdb
    go
    
  3. Verify that testtab is materialized by logging in to Sybase IQ and executing:

    select * from dbo.testtab
    go
    

    If materialization is successful, you see:

    c1           c2           c3
    ---------    ---------    ---------
    1            1            testrow 1
    2            2            testrow 2
    3            3            testrow 3
    (3 rows affected)