Marking and unmarking stored procedures  Unmarking a stored procedure

Chapter 3: Administering Sybase Replication Agent

Marking a stored procedure for replication

When you mark a stored procedure for replication, Replication Agent creates the transaction log objects that capture the stored procedure invocation in the transaction log.

NoteFor Orcacle, DDL replication must be disabled during the marking of stored procedures. See “Disabling replication for DDL”.

StepsTo mark a stored procedure for replication

  1. Log in to the Replication Agent instance with the administrator login.

  2. Use the pdb_setrepproc command to determine if the stored procedure is already marked in the primary database:

    pdb_setrepproc pdb_proc
    

    where pdb_proc is the name of the stored procedure in the primary database that you want to mark for replication.

    If the pdb_setrepproc command returns information that the specified stored procedure is marked, you need not continue this procedure.

    If the pdb_setrepproc command returns information that the specified stored procedure is not marked, continue this procedure to mark the stored procedure for replication.

  3. Use the pdb_setrepproc command to mark the stored procedure for replication.

    The pdb_setrepproc command allows you to mark the primary stored procedure to be replicated and specify a different stored procedure name to use in the replicate database (as specified in a function replication definition).

    If the value of the pdb_dflt_object_repl parameter is true (the default value), you can skip step 4 in this procedure.

    If the value of the pdb_dflt_object_repl parameter is false, you must enable replication for the stored procedure before replication can take place.

  4. Use the pdb_setrepproc command to enable replication for the marked stored procedure:

    pdb_setrepproc pdb_proc, enable
    

    where pdb_proc is the name of the marked stored procedure for which you want to enable replication.

    After replication is enabled for the stored procedure, you can begin replicating invocations of that stored procedure in the primary database.

    NoteIf your stored procedure is in Oracle, and you disabled DDL replication during stored procedure marking, remember to re-enable DDL replication. See “Enabling replication for DDL”.





Copyright © 2005. Sybase Inc. All rights reserved. Unmarking a stored procedure

View this book as PDF