Prepare and create the Mirror Replication Agent instance

A single installation of the Mirror Replication Agent can support replication from multiple databases; however, one Mirror Replication Agent instance is needed for each ASE database to be replicated. This section describes how to prepare and create a Mirror Replication Agent for ASE instance:

StepsTo prepare for a Mirror Replication Agent instance

  1. Determine the default settings you want.

    By default, Mirror Replication Agent is configured to mark every user table in the primary database for replication, and to create a replication definition for every table marked.Although these settings may be reasonable for production environments, they may not be useful in a test or proof-of-concept environment, where only a subset of tables are being replicated. If automatic table marking or replication definition generation options are not wanted, change the settings of two Mirror Replication Agent configuration parameters: pdb_automark_tables and pdb_auto_create_repdefs.

    For more information about the configuration parameters, refer to the Mirror Replication Agent Reference Manual.

  2. Locate the sample resource file.

    The majority of configuration values required to create and initialize a Mirror Replication Agent can be recorded and stored in a resource file. Using it provides a means to record or retain the configuration information for a Mirror Replication Agent for ASE instance, allowing an instance to be removed and re-created.A sample resource file is located in the Mirror Replication Agent $SYBASE/MA-15_0/init/ase.rs directory.

StepsTo create a Mirror Replication Agent instance

  1. Go to the $SYBASE/MA-15_0/init directory.

  2. Create an instance resource file. Copy the resource file template $SYBASE/MA-15_0/init/ase.rs file to another file that contains the configuration information for a new instance:

    cp ase.rs myma.rs
    
  3. Using a text editor, change the values assigned to the properties listed in Table 1-1:

    Table 1-1: Resource file parameters

    Parameter

    Description

    Example values

    instance name

    Any valid name.

    myma

    admin_port

    Port number that Mirror Replication Agent will use.

    20000

    disable_rat

    Disable Replication Agent thread.

    yes

    initialize_instance

    Initialize the Mirror Replication Agent instance.

    yes

    pds_host_name

    Machine (host) where ASE is installed.

    repit

    pds_port_number

    Port number for ASE.

    5600

    pds_database_name

    Name of database replicated from the primary data server.

    foo

    pds_username

    A valid user name that has “sa” and replicate roles.

    sa

    pds_password

    Password for pds_username.

    sa_ps

    NoteFor null passwords, leave blank.

    pds_sa_username

    System admin name.

    sa

    pds_sa_password

    System admin name password.

    sa_ps

    NoteFor null passwords, leave blank.

    ra_devicepath_1

    Primary database log mirror location information.

    ra_devicepath_1= logA, /dev/pubs2/logA.dat

    rs_charset

    Character set that Replication Server is using.

    NoteThe rs_charset value must be set to match the Replication Server character set.

    iso_1

    rs_host_name

    Machine where Replication Server is installed.

    repit

    rs_port_number

    Port where Replication Server is installed.

    11752

    rs_username

    User ID that Mirror Replication Agent uses to access primary Replication Server; it must have CONNECT SOURCE and CREATE OBJECT capabilities.

    SAMPLE_RS_ra

    rs_password

    Password for rs_username.

    SAMPLE_RS_ra_ps

    rs_source_ds

    ASE server of the primary database.

    repit150i

    rs_source_db

    Primary database.

    foo

    rssd_host_name

    Machine where RSSD resides.

    repit

    rssd_port_number

    Port number where RSSD resides.

    11751

    rssd_database_name

    Database name for RSSD.

    SAMPLE_RS_ERSSD

    rssd_username

    Valid user for RSSD.

    SAMPLE_RS_RSSD_maint

    rssd_password

    Password for rssd_username.

    SAMPLE_RS_RSSD_maint_ps

    start_instance

    Start the instance that was created.

    yes

  4. Validate and execute the new instance resource file:

    $SYBASE/MA-15_0/bin/ma_admin.sh -vr myma.rs
    

    where myma.rs is the path name of the resource file.

    Validation results are returned as either:

  5. After the resource file has been validated, allow the ma_admin utility to create the MRA instance:

    $SYBASE/MA-15_0/bin/ma_admin.sh -r myma.rs
    

    A message appears, indicating that response file processing is completed.

Using the example settings in the resource file

Using the example settings specified in the resource file, the Mirror Replication Agent will: