Adds a database to the replication system and sets configuration parameters for the connection. To create a connection for an Adaptive Server database, use Sybase Central or rs_init. To create a connection for a non-Adaptive Server database, see create connection using profile command.
create connection to data_server.database set error class [to] error_class set function string class [to] function_class set username [to] user [set password [to] passwd] [set replication server error class [to] rs_error_class] [set database_param [to] 'value' [set database_param [to] 'value']...] [set security_param [to] 'value' [set security_param [to] 'value']...] [with {log transfer on, dsi_suspended}] [as active for logical_ds.logical_db | as standby for logical_ds.logical_db [use dump marker]]
create connection to SYDNEY_DS.pubs2 set error class ansi_error set function string class sqlserver_derived_class set username pubs2_maint set password pubs2_maint_pw
create connection to TOKYO_DS.pubs2 set error class ansi_error set function string class sqlserver_derived_class set username pubs2_maint set password pubs2_maint_pw set replication server error class tokyo_rs_error with log transfer on
Use create connection to add a database to the replication system. Normally, you use this command to add connections to non-Sybase databases. To create a standard connection with an Adaptive Server database, use Sybase Central or rs_init.
To create a connection that uses heterogeneous datatype support (HDS) to translate datatypes from the primary to the replicate database, you can also use scripts provided by Sybase that both create the connection and install HDS. See the Replication Server Configuration Guide for your platform for instructions.
Execute create connection at the Replication Server that manages the database.
Replication Server distributes database connection information to qualifying sites through out the replication system. The changes do not appear immediately at all sites because of normal replication system lag time.
You must specify an error class, even if you use the default error class: rs_sqlserver_error_class.
You do not have to specify a Replication Server error class unless it is a new Replication Server error class. The default Replication Server error class is rs_repserver_error_class.
Only one connection is allowed per database. This is enforced by the ID Server, which registers each database in its rs_idnames system table. The ID Server must be available when you create a connection for a database.
Use set function string class [to] function_class to activate class-level translations for non-Sybase data servers.
Database Connection Parameters
Replication Server configuration parameters are stored in the rs_config system table. See the Replication Server Administration Guide Volume 1 for more information about the database connection parameters in the rs_config system table.
See the Replication Server Administration Guide Volume 2 for more information about configuring parallel DSI threads.
Use assign action to enable retry of transactions that fail due to specific data server errors.
The dump_load Configuration Parameter
The save_interval Configuration Parameter
Set save_interval to save transactions in the DSI queue that can be used to resynchronize a database after it has been restored from backups. Setting a save interval is also useful when you set up a warm standby of a database that holds replicate data or receives replicated functions. You can use sysadmin restore_dsi_saved_segments to restore backlogged transactions.
Error Classes and Function Classes
Error and Function Classes shows the error and function classes that Replication Server provides for Replication Server and database connections.
Class name |
Description |
---|---|
rs_repserver_error_class |
Error action assignments for Replication Server. |
rs_sqlserver_error_class |
Error action assignments for Adaptive Server databases. |
rs_sqlserver_function_class |
Function-string class for Adaptive Server databases. Cannot participate in function string inheritance. Replication Server generates function strings automatically. |
rs_default_function_class |
Function-string class for Adaptive Server databases. You cannot modify function strings. You can specify this class as a parent class, but not as a derived class. Replication Server generates function strings automatically. |
rs_db2_error_class |
Error class for DB2 databases. |
rs_db2_function_class |
Function-string class for DB2 databases. You cannot modify function strings. You can specify this class as a parent class, but not as a derived class. Replication Server generates function strings automatically. |
rs_iq_error_class |
Error class for Sybase IQ databases. |
rs_iq_function_class |
Function-string class for Sybase IQ Oracle databases. You cannot modify function strings. You can specify this class as a parent class, but its derived classes cannot inherit any class-level translations from the parent class. Replication Server generates function strings automatically. |
rs_msss_error_class |
Error class for Microsoft SQL Server databases. |
rs_ms_function_class |
Function-string class for Microsoft SQL Server databases. You cannot modify function strings. You can specify this class as a parent class, but its derived classes cannot inherit any class-level translations from the parent class. Replication Server generates function strings automatically. |
rs_oracle_error_class |
Error class for Oracle databases. |
rs_oracle_function_class |
Function-string class for Oracle databases. You cannot modify function strings. You can specify this class as a parent class, but its derived classes cannot inherit any class-level translations from the parent class. Replication Server generates function strings automatically. |
rs_udb_error_class |
Error class for UDB databases. |
rs_udb_function_class |
Function-string class for UDB databases. You cannot modify function strings. You can specify this class as a parent class, but its derived classes cannot inherit any class-level translations from the parent class. Replication Server generates function strings automatically. |
User Name and Password
Warm Standby Applications
To create a logical connection for a warm standby application, use create logical connection.
In a warm standby application, the connections for the active database and the standby database must have log transfer on.
The function-string class for a database in a warm standby application is used only when the database is the active database. Replication Server uses rs_default_function_class for the standby database.
Changing Connection Attributes
Network-Based Security Parameters
Both ends of a connection must use compatible Security Control Layer (SCL) drivers with the same security mechanisms and security features. The remote server must support the set proxy or equivalent command. It is the replication system administrator’s responsibility to choose and set security features for each server. The Replication Server does not query the security features of remote servers before attempting to establish a connection. Connections fail if security features at both ends of the connection are not compatible.
create connection specifies security settings for an outgoing connection from Replication Server to a target data server. Security features set by create connection override those set by configure replication server.
If unified_login is set to “required,” only the replication system administrator with “sa” permission can log in to the Replication Server without a credential. If the security mechanism should fail, the replication system Administrator can log in to Replication Server with a password and disable unified_login.
A Replication Server can have more than one security mechanism; each supported mechanism is listed in the libtcl.cfg file under SECURITY.
Message encryption is a costly process with severe performance penalties. In most instances, it is wise to set msg_confidentiality to “required” only for certain connections. Alternatively, choose a less costly security feature, such as msg_integrity.