Creating Replication Definitions and Subscriptions

Create replication definitions and subscriptions for the tables marked for replication to Sybase IQ after you enable and configure RTL.

  1. Create the repdef_testtab replication definition and add any required referential constraint clauses to the replication definition to support RTL:
    create replication definition repdef_testtab
    with primary at ORA_DS.pdb1
    with primary table named ‘TESTTAB’
    with replicate table named dbo.‘testtab’
    (C1 as c1 int, C2 as c2 int, C3 as c3 char(10))
    primary key(C1)
    go
    Note: The default character case of Oracle is all upper case for object names. You can convert object names from upper to lower case in the replication definition, as shown in the example in step 1, or by using the ltl_character_case Replication Agent for Oracle configuration parameter. See "ltl_character_case" in Chapter 2, "Configuration Parameters" in the Replication Agent Reference Manual in Replication Server Options.

  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)