Direct Load Materialization from a Non-Adaptive Server Database to HANA DB

Use this procedure to set up direct load materialization and materialize data from a Microsoft SQL Server, Oracle, or DB2 UDB primary to a HANA DB replicate.

Replication Agent is used in direct load materialization from a Microsoft SQL Server, Oracle, or DB2 UDB primary: Replication Server logs in to Replication Agent, and Replication Agent issues queries on behalf of Replication Server, returning query results to Replication Server.
  1. Use dsedit to update the Replication Server sql.ini (Windows) or interfaces (UNIX or Linux) file to include an entry for the Replication Agent location.
  2. At the Replication Server that manages the primary database, create a connection to the primary database:
    create connection to pds.pdb
    using profile profile_name;standard
    set username muser
    set password mpwd
    with log transfer on,
    • pds is the value of the rs_source_ds parameter specified in Replication Agent.

    • pdb is the value of rs_source_db specified in Replication Agent.

    • profile_name is rs_rs_to_msss_ra for Microsoft SQL Server, rs_rs_to_oracle_ra for Oracle, or rs_rs_to_udb_ra for DB2 UDB

    • muser is the maintenance user for the primary database.

    • mpwd is the maintenance user password.

    You only need to do this once.
    If you have an existing primary database connection that does not use one of these connection profiles (rs_rs_to_msss_ra, rs_rs_to_oracle_ra, or rs_rs_to_udb_ra), you must alter that connection so that it uses the correct function string class (rs_msss_ra_function_class, rs_oracle_ra_function_class, or rs_udb_ra_function_class) and the ra_ra_error_class error class.
  3. Use isql to log in to the replicate Replication Server:
    isql -Uiuser -Pipassword -SRRS_servername
    • iuser is the subscription creator, who must have create object permission.

    • ipassword is the password for user.

    • RRS_servername is the server name of the replicate Replication Server.

  4. (Optional) Open an isql session to Replication Agent with the user ID and password from the following step. This is to ensure that the user ID in the following step has the proper Replication Agent permissions and the correct password.
  5. At the replicate Replication Server, create the subscription:
    1> create subscription subscription_name
    2> for replication_definition
    3> with replicate at dataserver.database
    4> [where search_conditions]
    5> without holdlock
    6> direct_load
    8> [user cusername password cpass]
    9> go 

    The dataserver.database must match the Replication Server connection name you use for the replicate database.

    If you specify cusername here, this user is used to connect to Replication Agent. It must be the Replication Agent admin user. If you do not specify cusername here, iuser—the name specified in isql—is used. Make sure that this user is the Replication Agent admin user.

  6. Monitor the progress of the subscription materialization:
    1> check subscription subscription_name for repdef_name
    2> with replicate at replicate_dataserver.replicate_database
    3> go 

    When materialization is complete, Replication Server returns a message similar to:

    Subscription <subscription_name> has been MATERIALIZED at the replicate.

    When the subscription process is complete, Replication Server returns a message similar to:

    Subscription <subscription_name> is VALID at the replicate.
    If there is an error in the subscription process, the check subscription command returns a message similar to:
    Subscription <subscription_name> encountered ERROR.
    When a subscription encounters an error, look at the replicate and primary Replication Server log files to diagnose the cause, drop the subscription without purge, delete data from the replicate table, correct the error, and then recreate the subscription. See the Replication Server Troubleshooting Guide > Subscription Problems > check subscription > Materialization Status and the Replication Server Troubleshooting Guide > Subscription Problems > Materialization Problems.

When you complete this procedure, the subscription is created, the replicate data is consistent with the primary data, and replication of this table is enabled.

See the Replication Server Reference Manual > Replication Server Commands and the Replication Server Administration Guide Volume 1 for information on configuring Replication Servers and materialization methods.