Show TOC

create alternate connectionLocate this document in the navigation structure

Adds an alternate primary or replicate connection, or an alternate active or standby connection, and sets configuration parameters for the connection.

Syntax
create alternate connection to <data_server.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] <passwd>]
[set <database_param> [to] '<value>' [set <database_param> [to] '<value>']...]
[set <security_param> [to] '<value>' [set <security_param> [to] '<value>']...]
[with {log transfer on | primary only}]
[as {active | standby} for <conn_lds.conn_ldb>]
Parameters
data_server

The data server that holds the database to which you want to add an alternate primary or replicate connection.

database

The database to which you want to add an alternate primary or replicate connection.

conn_server.conn_database
The name of the alternate primary or replicate connection.
  • For alternate replicate connections, 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 primary connection name must be unique among all primary connection names in a replication system. Each replicate connection name must be unique among all replicate connection names in a replication system.
  • To bind an alternate primary connection to an alternate Replication Agent path to create a primary replication path, <conn_server.conn_db> must match the name of the Replication Agent path from Replication Agent to Replication Server, and <conn_server> must be the same as <dataserver>
error_class

The error class that is to handle errors for the database.

function_class

The function string-class to be used for operations in the database.

user

The login name of the Replication Server maintenance user for the database for an alternate replicate connection. Replication Server uses this login name to maintain replicated data. You must specify a user name if network-based security is not enabled.

passwd

The password for the maintenance user login name. You must specify a password unless a network-based security mechanism is enabled.

database_param

A parameter that affects database connections from the Replication Server. You can use the same parameters that you use for alter connection or create connection.

value

A character string that contains a value for the option.

security_param

A parameter that affects network-based security. You can use the same parameters that you use for alter connection or create connection.

log transfer on

Instructs Replication Server to create an alternate primary connection and an alternate replicate connection to the database you specify in <dataserver.database>, with both primary and replicate alternate connections having the name you specify in <conn_server.conn_db >

primary only

Instructs Replication Server to create only an alternate primary connection to the primary database with the name you specify in <conn_server.conn_db>.

as {active | standby} for conn_lds.conn_ldb

Instructs Replication Server to create an alternate connection to either the active or standby database of a warm standby pair if you have created an alternate logical connection named <conn_lds.conn_ldb>

Examples
Example 1
Create an alternate primary connection named SALES_DS.pdb_conn2 to the pdb database in the SALES_DS data server:
create alternate connection to SALES_DS.pdb
named SALES_DS.pdb_conn2
with primary only
go
Example 2
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
Example 3
Create an alternate replicate connection called IQSRVR.lqdb_conn2 to the lqdb replicate database in the IQSRVR SAP IQ data server where the primary database is Adaptive Server and dbmaint2 is the maintenance user for IQSRVR.lqdb_conn2:
create alternate connection to IQSRVR.iqdb
named IQSRVR.iqdb_conn2
using profile rs_ase_to_iq; standard
set username to dbmaint2
set password to dbmaint2pwd
go

You can also create alternate connections to available SAP IQ multiplex nodes. Ensure that the connection names are unique.

To create the iqdb2_conn1 alternate connection to the iqbd2 database in the IQSRVR SAP IQ node:
create alternate connection to IQSRVR.iqbd2
named IQSRVR2.iqdb2_conn1
using profile rs_ase_to_iq; standard
set username to dbmaint3
set password to dbmaint3pwd
go
Usage
  • set function string class, set username, and set password are 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 replicate connection can inherit values from the default connection only if the same Replication Server controls both default and alternate connections.
    • If you do not set the maintenance user for the alternate connection, the connection inherits the default connection maintenance user. The alternate connection uses any new maintenance user that you specify for the alternate connection.
  • set <database_param> and set <security_param> are existing clauses for alter connection and create connection that you can use to specify existing optional connection parameters.
    • Any value you set for the alternate 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.
  • Execute create alternate connection at the Replication Servers that belong to the same replication domain that manages the database.
  • To create alternate logical connections for a warm standby application, use create alternate logical connection and create alternate connection.
  • Use alter connection to change the attributes of a connection. If the password of the maintenance user has been changed, use alter connection to enter the new password.
  • See Replication Server Administration Guide Volume 2 > Performance Tuning > Multi-Path Replication.
Permissions

create alternate connection requires “sa” permission.