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 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 who has the authority to grant access to the maintenance user (muser).
    • password is the user password.
    • 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_ase_to_hanadb;ech
    set username muser
    set password mpwd
    go
    For SAP Secure User Store:
    create connection to rds.rdb
    using profile rs_ase_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 Replication Server 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.