Replicating DDL in a Warm Standby Environment

Replicate DDL in a warm standby environment.

  1. Log in to the active database using a user ID that exists on both the active and standby data server, and that has permission to create a table.
    Note: Do not use the maintenance user ID with the same password that you have defined when the active connection was set up.
  2. Create a new table:
    % isql -Usa -P -Ssunak1505i
    use pubs2
    go
    create table t1 (a integer, b char(10), c datetime))
    go
  3. Create unique indexes for better performance:
    create unique clustered index t1_idx1 on t1 (a,b)
    go
  4. Log in to the standby database:
    % isql -Usa -P -Swingak1505i
    use pubs2
    go
  5. Verify that the table and index exists in the standby database. If the table and index do not exist, follow the instructions in steps 6 and 7 otherwise, go to step 8.
  6. Check the Replication Server log file in: $SYBASE/REP-15_5/install/PRS.log. Correct the errors and resume the connection to the standby database:
    resume connection to rds.rdb
    go
    where:
    • rds – is the name of the data server that hosts the standby database.
    • rdb – is the name of the standby database.
    Note: If there are errors in the Replication Server log, make sure that the user making the corrections is not the same maintenance user used to set up the active connection.
  7. If you want Replication Server to skip any current transaction when trying to resume connection to the standby database, use:
    resume connection to rds.rdb
    skip transaction
    go

    See the Replication Server Reference Manual > Replication Server Commands > resume connection for other available options for the resume connection command.

  8. Grant insert, update, and delete permission for the new table to the replicate database maintenance user at the standby database:
    grant all on t1 to pubs2_maint
    go