Creating Alternate Replicate Connections

Use create alternate connection to create alternate connections from Replication Server to the replicate database.

Enter:
create alternate connection to dataserver.database
named conn_server.conn_db
[set error class [to] error_class
set function string class [to] function_class
set username [to] user
set password [to] pwd]
[set database_param [to] ‘value’]
where:
  • dataserver and database – are the replicate data server and database.
  • conn_server.conn_db – the alternate replicate connection, which comprises the data server name and a connection name.
    • If conn_server is different from dataserver, there must be an entry for conn_server in the interface file.
    • If conn_server is the same as dataserver, conn_db must be different from database.
    • Each replicate connection name must be unique in a replication system.
  • set function string class [to] function_class, set username [to] user, and set password [to] pwd – existing clauses for alter connection and create connection that you can use when you create alternate connections.
    • If you omit these clauses, the alternate replicate connection inherits the values that you set with the default replicate connection.
    • If you omit these clauses when you create an alternate connection on a (current) Replication Server that is different from the (controller) Replication Server that controls the default connection, the current Replication Server returns an error.
    • The alternate connection can inherit the values from the default connection only if the same Replication Server controls both alternate and default connections.
    • If you do not set the maintenance user for the alternate connection, it inherits the default connection maintenance user. The alternate connection uses any new maintenance user that you specify for the alternate connection.
  • set param – clauses for existing optional connection parameters for alter connection and create connection.
    • Any value you set for the alternate replicate connection overrides inherited values from the default connection or the default values.
    • The alternate connection can inherit the values from the default connection only if the same Replication Server controls both alternate and default connections.
For example, to create an alternate replicate connection named FINANCE_DS2.rdb_conn2 to the rdb replicate database in the FINANCE_DS data server:
create alternate connection to FINANCE_DS.rdb
named FINANCE_DS2.rdb_conn2
go
Note: You must define FINANCE_DS and FINANCE_DS2 in the interfaces or sql.ini file