How to create channel, add tables and set PK/Distribution Key for tables from Command Line.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12545
    Bhavik
    Participant

    Hi Team,

    Problem: To create channel for 500+ tables and set PK and DK for all tables with approx 250 columns in each tables.. this process is very tedious.

    I am looking for you help here… How can perform this task from Command line instead of HvrGUI.
    Please guide me.

    Thanks in advance…
    -Bhavik

    #12549
    ggoodrich
    Keymaster

    Hello Bhavik,

    Yes, we can accomplish your needs using a command line utility named hvradapt.

    It sounds like you are already familiar with using the Table Explore feature via the HVR Console (GUI) to define which tables are included in the replication channel definition. You are then clicking on the properties to manage the replication or distribution keys. As you noticed, HVR was already setting the PK based on the tables primary key or unique index. If you want a command line equivalent, then hvradapt is the command utility to use.

    In short, create an input file that lists all of the tables to include. You probably want to add a “+” to the top line indicating to add tables to channel. When you create the list of table names, add the -K (column list) after the table name to declare which columns to use for the distribution key.

    You can find examples of a sample input file and example running the command in the following wiki page: https://www.hvr-software.com/wiki/Hvradapt

    Best!

    Glenn

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘How to’ is closed to new topics and replies.

© 2020 HVR

Test drive Contact us