Configuring Replication Server for Replication to SAP HANA Database

Create a Replication Server connection to SAP HANA database.

If you are not using the sample Replication Server instance, enter your Replication Server instance name in place of SAMPLE_RS.
  1. If you are connecting to SAP HANA database with a standard connection and not using SAP Secure User Store, add an entry to your Replication Server interfaces file identifying the replicate SAP HANA database, and then stop and start Replication Server:
    [dataservername]
    master tcp ether hostname port 
    query tcp ether hostname port
    where hostname and port are the host and port number of the SAP HANA database, and dataservername is a label used to identify the host and port number. For information about stopping and starting Replication Server, see the Replication Server Administration Guide Volume 1 > Manage a Replication System.
    Note: Each SAP HANA database installs with a unique instance number, and the port number is the instance number prefixed with 3 and suffixed with 15:
    3in15
    where in is the two-digit instance number. For example, the port number for an SAP HANA database with instance number 1 is 30115.
    If you are using SAP Secure User Store, create a user store of encrypted credentials:
    hdbuserstore set rds myhost:xxxxx my_securestore_user my_securestore_pwd
    where:
    • rds is the key for the secure store entry.
    • myhost:xxxxx is the connection environment host name and port number.
    • my_securestore_user and my_securestore_pwd are SAP Secure User Store credentials.
  2. On SAP HANA database, create a maintenance user:
    1. As the SAP HANA database admin user, create a user ID with a temporary password:
      CREATE USER muser PASSWORD mpwd_temp
    2. Log in to SAP HANA database with the temporary password, and then update the password:
      ALTER USER muser PASSWORD mpwd_new
    3. Log out of SAP HANA database, and log in again with the new password.
  3. Log in to SAP HANA database:
    ./hdbsql -u user -p password -i id
    where user is the SAP HANA database user, password is the user password, and id is the instance number.
  4. On SAP HANA database, grant these authorities to the maintenance user:
    GRANT CREATE ANY, DELETE, DROP, EXECUTE, 
    INDEX, SELECT, UPDATE ON SCHEMA myschema TO muser
    
    where myschema is your SAP HANA database schema, and muser is the maintenance user you just created.
  5. Log in to Replication Server:
    isql –Usa –Psa_pass –SSAMPLE_RS
    If you have not set up the sample Replication Server instance, enter your Replication Server instance name instead of SAMPLE_RS.
  6. Create a connection to the replicate SAP HANA database instance using ExpressConnect for HANA DB.
    For a standard connection:
    create connection to rds.rdb
    using profile rs_oracle_to_hanadb;ech
    set username muser
    set password mpwd
    go
    For SAP Secure User Store:
    create connection to rds.rdb
    using profile rs_oracle_to_hanadb;ech
    set username auser
    set password apwd
    set dsi_connector_sec_mech to "hdbuserstore"
    go
    where:
    • rds is the replicate SAP HANA database. For a standard connection, this must match the data server name in the interfaces file entry. See the Adaptive Server Enterprise Configuration Guide for UNIX > Set Up Communications Across the Network > Contents of the interfaces File and the Adaptive Server Enterprise Configuration Guide for Windows > Network Communications Using sql.ini. For an SAP Secure User Store connection, this must match what you used as the key to create a user store of encrypted credentials with the hdbuserstore utility.

    • rdb is a placeholder; you must provide a value, but it is not used.

    • muser is the maintenance user for the replicate SAP HANA database instance you have already created.

    • mpwd is the replicate SAP HANA database maintenance user password.

    • auser and apwd are unused values supplied only to satisfy the syntax of the create connection command.

    Note: For an SAP Secure User Store connection, the same user who ran the hdbuserstore utility must run the create connection command.
    If you have trouble connecting to the replicate SAP HANA database instance using ExpressConnect for HANA DB, see the Replication Server Troubleshooting Guide > Common Error Messages > Connector Error Messages.
  7. Use admin show_connections, 'replicate' to display the replicate connection you created.