• No results found

SAP HANA Database 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 SAP HANA database 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 SAP HANA database replicate database • Set connection properties

You can connect using ExpressConnect for SAP HANA Database, and the version or option name of the connection profile must 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 SAP HANA database.

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 an SAP HANA database data server and access replication-related tables and procedures.

Warning! ExpressConnect for SAP HANA Database supports the replication of LOB columns that use default Replication Server function strings for text and image processing. ExpressConnect for SAP HANA Database 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 SAP HANA database, or

• the key name for the SAP Secure User Store entry for the SAP HANA 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 SAP HANA database replicate database by the appropriate named connection profile:

• rs_ase_to_hanadb – translates Adaptive Server datatypes to SAP HANA database datatypes.

• rs_msss_to_hanadb – translates Microsoft SQL Server datatypes to SAP HANA database datatypes.

• rs_oracle_to_hanadb – translates Oracle datatypes to SAP HANA database datatypes.

• rs_udb_to_hanadb – translates DB2 UDB datatypes to SAP HANA database datatypes.

An example of a script using ExpressConnect for SAP HANA Database version profile for an Adaptive Server Enterprise (ASE) to SAP HANA database 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 SAP HANA Database 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 SAP HANA Database.

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 SAP HANA database 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 SAP HANA Database, 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 SAP HANA Database instance with the encrypted credentials. For example, to connect to the SAP HANA database instance for ASE-to-SAP HANA database 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 an SAP HANA database 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