Marking the Active Database for Replication

Use sp_reptostandby or sp_setreptable to replicate tables in the active database.

The database is enabled for both SQL statement replication (available in Adaptive Server 15.0.3 and later) and non-SQL statement replication.

You can enable replication for tables in the active database in either of these ways:
  • Use sp_reptostandby to mark the database for replication, enabling replication of data and supported schema changes or,
  • Use sp_setreptable to mark individual tables for replication of data changes.

In this example, we have used sp_reptostandby to mark the database for replication.

  1. Log in to the Adaptive Server as the system administrator:
    % isql -Usa -P -Ssunak1505i
    use pubs2
    go
  2. Mark the database tables for replication for both DDL and DML commands and procedures:
    sp_reptostandby pubs2,'all'
    go
    
    The replication mode for database 'pubs2' has been
    set to 'ALL'.
    (return status = 0)
  3. Mark the database to send SQL statements for update, delete, insert, and select into commands, if the SQL statement threshold has been met:
    sp_setrepdbmode pubs2,'UDIS','on'
    go
    
    The replication mode for database 'pubs2' is 'udis'.
    (return status = 0)
  4. Set the database threshold for SQL statement replication from the default of 50, to 10.
    sp_setrepdbmode pubs2,'threshold','10'
    go
    
    The replication threshold for 'pubs2' is '10'.
    (return status = 0)
    Note: You can also set the threshold per table:
    sp_setrepdefmode t1,'threshold','10'
  5. Exit the isql session.