• No results found

DB2 UDB Replicate Database Configuration

The heterogeneous datatype support (HDS) feature of Replication Server provides configuration information that allows you to set up the HDS feature in the replicate Replication Server and the DB2 UDB replicate database.

You provide this configuration information as part of the installation, and as part of the connection profile:

• Replication Server installation:

• Create function strings, error classes, and user defined datatypes • Connection profiles:

• Apply class-level datatype translations to RSSD • Create objects in the DB2 UDB replicate database • Set connection properties

• Additional settings

• Settings in ECDA (required)

• Settings for Dynamic SQL (optional) • Settings for Command Batching (optional)

See also

• Class-Level Datatype Translations to RSSD on page 96

• Objects in the DB2 UDB Replicate Database and Connection Properties on page 97

Replication Server Installation

Replication Server installation automatically installs the required function strings and classes to support replication.

Function Strings, Error Classes, and User Defined Datatypes

Function strings are added to the Replication Server default rs_udb_function_class. The function string replaces several default Replication Server function strings with custom function strings designed to communicate with the DB2 UDB replicate database and access the tables and procedures that were created.

To find the error action defined for an error class, see the Replication Server Reference Manual > RSSD Stored Procedures > rs_helperror.

Connection Profiles

Connection profiles allow you to configure your connection with a predefined set of properties that match your primary and replicate database replication requirements.

Syntax

create connection to data_server.database using profile connection_profile;version set username [to] user

[other_create_connection_options] [display_only]

Parameters

data_server – The data server that holds the database to be added to the replication system. database – The database to be added to the replication system.

connection_profile – Indicates the connection profile that you want to use to configure a connection, modify the RSSD, and build replicate database objects.

version – Specifies the connection profile version to use.

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

other_create_connection_options – Use the other create connection options to set connection options not specified in the profile, such as setting your password, or to override options specified in the profile, such as specifying a custom function string class to override the function string class provided in Replication Server. See the Replication Server Reference Manual > Replication Server Commands > create connection for a complete list of the other options for create connection command.

display_only – Use display_only with the using profile clause to display the commands that will be executed and the names of the servers upon which the commands will be executed. See the client and Replication Server logs for the result of using display_only.

Class-Level Datatype Translations to RSSD

Class-level translations identify primary datatypes and the replicate datatypes into which data is to be translated (for example, Microsoft SQL Server binary should be translated to DB2 UDB CHAR FOR BIT DATA).

These connection profiles supply class-level translation for the DB2 UDB replicate database: • rs_ase_to_udb – installs Adaptive Server-to-DB2 UDB class-level translations. • rs_db2_to_udb – translates DB2 for z/OS datatypes to DB2 UDB datatypes. • rs_msss_to_udb – translates Microsoft SQL Server datatypes to DB2 UDB

• rs_oracle_to_udb – translates Oracle datatypes to DB2 UDB datatypes. To see all the available profiles, use the admin show_connection_profiles command.

Objects in the DB2 UDB Replicate Database and Connection Properties

The connection profile creates the RS_INFO, RS_LASTCOMMIT, and RS_TICKET_HISTORY tables in the replicate database.

The connection profiles set these connection properties: set error class rs_udb_error_class

set function string rs_udb_function_class

Additional Settings

Learn about the additional settings provided to support replication. The settings include:

• Settings in ECDA (required)

Use the following settings in the ECDA configuration file: Transaction Mode = long

allocate = connect

SQL transformation = Sybase • Settings for Dynamic SQL (optional)

Dynamic SQL is supported as of Replication Server 15.0.1 and requires DirectConnect UDB 12.6.1 ESD #2, or later.

• Settings for Command Batching (optional)

Command batching allows Replication Server to send multiple commands to the data server as a single command batch. You can put multiple commands in a language function- string output template, separating them with semicolons (;). If the database is configured to allow command batches, which is the default, Replication Server replaces the semicolons with that connection’s DSI command separator character before sending the function string in a single batch to the data server. The separator character is defined in the

dsi_cmd_separator option of the alter connection command.

If the connection to the database is not configured to allow batches, Replication Server sends the commands in the function string to the data server one at a time. To enable or disable batching for a database, use the alter connection command.

To use command batching, enter: set batch = on

set dsi_cmd_separator = ; set batch_begin = off use_batch_markers = on

For information on setting batch and dsi_cmd_separator options, see the Replication Server Reference Manual > alter connection.