Creating Replication Objects on Master

A Replication Object Definition describes the structure and content of a Replication Object.

Some Replication Object Definitions are part of the IFS/Applications components and the repository should have this information installed already. If not, it should be possible to install them. There could be some need to modify existing Replication Object Definitions due to customer modifications and there could be a need to create new Replication Objects.

Contents

Creating a Replication Object Definition

Open the Replication folder.

  1. Open Replication Object Definitions.
    1. Create a new row.
      Replication Object Definition = <Replication Object Name>
      ,
      Master Component = <Master Component Name>,
      Master LU = <LU Name> and
      New Modify Error = √ or empty.

    Master Component is chosen from a List-Of-Values of installed components and the value is used to narrow the List-Of-Value on the Master LU attribute.

    Note! When a replicated data is received at a Replica the message containing the data also contains information on what operation on the Master resulted in replication. The operation can be New or Modify. When data is received the Replica always check if data with the same key as the received data is already present in the database. If the New Modify Error attribute is checked then an error is reported if the operation is New and the object already exist in the database or if the operation is Modify and the object is not present in the database. If the New Modify Error attribute is not checked then the object is created (if not present) or modified (if present) regardless of operation.

  2. Open Replication Object Definition.
    The navigator shows the Replication Objects. Open a Replication Object and all the LUs contained in the object are shown. Open an LU and the view for the LU is shown.

    New LUs are added to a Replication Object with a RMB function. Select a Replication Object, press RMB and choose Insert LU… The displayed dialog box contains the attributes Replication Object Definition, Component, LU Name and Context. Same rules as for the overview window apply. A value has to be chosen for Context. If the context is not known choose any value, it can be changed later.

  3. Select an LU.
    The right pane of the window contains some attributes. Context defines the context in which the object exists. Possible values are Company, Site or Instance.
    LUs that have Company_Id as part of primary key have Context = Company,
    LUs that have Contract as part of primary key have Context = Site,
    all others have Context = Instance which means that an object is shared by many Company/Sites.

    View Name defaults to LU name and Trigger Table defaults to LU name with the suffix _TAB. Change these values if they are not the correct ones.

    Sometimes several LUs share the same table. If it is so there is some condition in the view that selects the rows belonging to the LU. If there is such a condition it should be entered in Trigger Condition. This makes sure that the trigger only fires when data belonging to the particular LU is changed.

    The Trigger Condition must have the prefix new.

    For example:

        LU = Account, 
        View Name = ACCOUNT 
        Trigger Table = ACCOUNTING_CODE_PART_VALUE_TAB
        Trigger Condition = new.code_part = ‘A’
  4. Select a View.
    The right part of the window contains a list of view attributes. The ROD Key Name (Replication Object Definition Key Name) is usually entered by the system. If not put the name of the primary key column here on the primary key attribute row. If there are any attributes in the view that have a different name in the table, the column name in the table has to be entered in the Table Key Name column. If there are any derived attributes in the view, i.e. attributes that have a function call in the view, a table column name has to be entered in the Table Key Name column (any column present in the table will do).

Changing a Replication Object Definition

Open the Replication folder.

  1. Open Replication Object Definition.
    The navigator shows the Replication Objects.
    1. Open a Replication Object and all the LUs contained in the object are shown.
    2. Open an LU and the view for the LU is shown.
      If a LU name appears in red in the navigator the description of the LU in the repository doesn’t match the actual structure of the LU in the database. The repository can be updated with a RMB function.
    3. Select the LU, press RMB and choose Refresh LU. Any missing view attributes will be added to the repository.

Exporting Replication Object Definitions

If only Replication Objects delivered with the applications are used there is no need to export any data. The same Replication Object Definitions should be available at the Replica(s).

If new Replication Objects has been created they have to be exported from the Master and imported at the Replica(s).

Open the Replication folder.

  1. Open Replication Object Definitions.
    1. Select a Replication Object and press RMB.
    2. Choose Create Deployment File… on the menu. Create a file for each Replication Object. The created file(s) must be moved to the Replica(s) and installed. The file(s) are ordinary SQL command files that can be executed from SQL*Plus or any other suitable tool.