Creating a replicate database connection

After you have installed datatype definitions, Replication Server database objects, function strings, and class-level translations, you must create a database connection to the replicate database. Replication Server uses database connections to specify how it connects to a database and how it handles the information it sends to and receives from the database.

To create a database connection for a non-Sybase replicate database, log in to the replicate Replication Server and execute a database connection script that invokes the Replication Server create connection to command.

StepsCreating a database connection for a non-Sybase replicate database

Sample scripts are provided for each non-Sybase database supported by HDS. The following databases and connection scripts are supported by HDS in Replication Server version 15.0.1:

Database

Script

ASA

hds_asa_connection_sample.sql

DB2

hds_db2_connection_sample.sql

Informix

hds_informix_connection_sample.sql

Microsoft SQL Server

hds_msss_connection_sample.sql

Oracle

hds_oracle_connection_sample.sql

UDB

hds_udb_connection_sample.sql

Identify the sample script you need, then edit the database connection sample script for the database you want to use as a replicate database.

  1. Modify create connection to to specify the name of the database gateway server and the name of the replicate database:

    create connection to rbds.rdb
    

    where:

  2. Modify set username to specify the user ID of the Replication Server maintenance user for the replicate database; where rs_maint_user is the user ID of the Replication Server maintenance user for the replicate database:

    set username rs_maint_user
    
  3. Modify set password to specify the password of the Replication Server maintenance user for the replicate database, where rs_maint_user_ps is the password of the replicate Replication Server maintenance user for the replicate database:

    set password rs_maint_user_ps
    

    NoteThe Replication Server maintenance user ID must be granted update permission on the replicate database.

  4. Modify [with log transfer on] [, dsi_suspended] to set up the database connection for the intended use of the database.

    If the database is to be used as a bidirectional database (both a primary and a replicate), enable only the log transfer on option:

    with log transfer on
    

    If the database is to be used as a primary database only, enable both the log transfer on option and the dsi_suspended option:

    with log transfer on, with dsi_suspended
    

    If the database is to be used as a replicate database only, enable only the log transfer off option:

    with log transfer off
    
  5. With a user ID sa permission in the replicate Replication Server to execute the database connection script, log in to the Replication Server host machine or a machine with a network connection to the replicate Replication Server host machine.

    NoteIn this procedure, isql is used as the Open Client application to access the replicate Replication Server. You can use any Open Client application to access the replicate Replication Server.

  6. At the operating system prompt, enter:

    isql -Uuser -Ppw -Sserver -Drepsvr -iscript_name
    

    where:

NoteAfter you create the Replication Server database connection to the replicate database, verify the database side of the connection by using the user ID and password you specified for the Replication Server maintenance user, to log in to the replicate database and select data from tables in the database.