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 HANA DB replicate database.
The configuration information is provided 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 profile:
• Apply class-level datatype translations to RSSD • Create objects in the HANA DB replicate database • Set connection properties
You can connect using ExpressConnect for HANA DB, and the version or option name of the connection profile should be “ech.”
• Additional settings: • ExpressConnect settings • Settings for Command Batching • Settings for Dynamic SQL
Replication Server Installation
Replication Server installation automatically installs the required function strings and classes to support replication into HANA DB.
Function Strings, Error Classes, and User Defined Datatypes Function strings are added to the Replication Server default
rs_hanadb_function_class.
The function string class replaces several default Replication Server function strings with custom function strings designed to communicate with a HANA DB data server and access replication-related tables and procedures.
Warning! ExpressConnect for HANA DB supports the replication of LOB columns that use default Replication Server function strings for text and image processing. ExpressConnect for HANA DB does not support custom function strings for text and image processing. If you override the default Replication Server LOB processing with custom function strings for
rs_writetext, rs_textptr_init, or other LOB-related function strings, text and image processing will fail.
Connection Profiles
Connection profiles allow you to configure your connection with a predefined set of properties.
Syntax
create connection to data_server.database using profile connection_profile;version set username [to] user
set password [to] password
[other_create_connection_options] [display_only]
Parameters data_server – Either:
• a reference to an interfaces file entry listing the host and port number of the HANA DB database, or
• the key name for the SAP Secure User Store entry for the HANA DB database 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 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 the data must be translated into.
Class-level translation is supplied for the HANA DB replicate database by the appropriate named connection profile:
• rs_ase_to_hanadb – translates Adaptive Server datatypes to HANA DB datatypes. • rs_msss_to_hanadb – translates Microsoft SQL Server datatypes to HANA DB
datatypes.
• rs_oracle_to_hanadb – translates Oracle datatypes to HANA DB datatypes. • rs_udb_to_hanadb – translates DB2 UDB datatypes to HANA DB datatypes. An example of a script using ExpressConnect for HANA DB version profile for an Adaptive Server Enterprise (ASE) to HANA DB replication environment:
create connection to hana_server.hana_db using profile rs_ase_to_hana;ech
set username rs_maint_user set password rs_maint_user_pwd go
Objects in the HANA DB Replicate Database and Connection Properties The connection profile creates the rs_ticket_seq sequence and the rs_info, rs_lastcommit, rs_status, and rs_ticket_history tables in the replicate database.
The connection profiles set these connection properties: set error class rs_hanadb_error_class
set function string rs_hanadb_function_class
SAP Secure User Store
Use the SAP Secure User Store for non-ASE and non-IQ connectors, like ExpressConnect for HANA DB.
To support SAP Secure User Store logins, use the dsi_connector_sec_mech parameter with the create connection or alter connection commands. No interfaces file entry is required for the connection to the HANA DB instance when you use an SAP Secure User Store login. The dsi_connector_sec_mech parameter is not a network-based security parameter. It is valid only for connections.
To use dsi_connector_sec_mech with ExpressConnect for HANA DB, you must first use the
hdbuserstore utility to create a secure user store of encrypted credentials. For example: hdbuserstore set hanads myhost:30215 myuser mYpA5Sw0rD
where "hanads" is a label used as the key for querying the secure user store, "myhost:30215" is the connection environment host name and port number, "myuser" is the user ID, and "mYpA5Sw0rD" is the password.
Note: The secure store must be created with the same operating system user ID that starts and runs Replication Server. Otherwise, Replication Server cannot access the secure user store. Once you have created a secure user store, you can create a connection to the HANA DB instance with the encrypted credentials. For example, to connect to the HANA DB instance for ASE-to-HANA DB replication:
create connection to hanads.hanadb using profile rs_ase_to_hanadb;ech set username "foo"
set password "bar"
set dsi_connector_sec_mech to "hdbuserstore" go
where the user ID and password "foo" and "bar" are unused values supplied only to satisfy the syntax of the create connection command.
Note: The same operating system user who started Replication Server must also own the secure user store.
You can alter an existing connection to a HANA DB instance to use
dsi_connector_sec_mech. For example: alter connection to hanads.hanadb
set dsi_connector_sec_mech to "hdbuserstore" go
After running the alter connection command, you must suspend and resume the connection: suspend connection to hanads.hanadb
go
resume connection to hanads.hanadb go
Additional Settings
Learn about the additional settings provided to support replication. The settings include:
• Command Batching settings • Dynamic SQL settings • HVAR settings
Command Batching
HANA DB does not support command batching. Do not turn on command batching for the HANA DB database connection.
Dynamic SQL
The dynamic_sql configuration parameter is set to 'on' by default, and this setting is recommended for all HANA DB connection profiles.
HVAR
If you have a Replication Server license for Advanced Service Options, you can use Replication Server High-Volume Adaptive Replication (HVAR) in replicating to HANA DB. See the Replication Server Administration Guide Volume 2 > Performance Tuning > Advanced Services Option > High Volume Adaptive Replication to Adaptive Server.