Creating a Datatype Definition in Replication Server

Create a definition for your user-defined datatype.

Prerequisites
You must have Replication Server administrator privileges or permission. Also, if you are using Replication Server 15.1 or earlier, see "Replication Server and RSSD Scripts" first.
Task

To replicate user-defined datatypes in Oracle, the datatype specified in the replication definition must be rs_char_raw.

  1. Log in to the RSSD.
  2. Add a row to the rs_datatype table using this example as a guide:
    /*  rs_oracle_udd_raw - char with no delimiters */
    insert into rs_datatype values(
    0,                   /* prsid */
    0x0000000001000008,  /* classid */
    'rs_oracle_udd',     /* name */
    0x0000000000010210,  /* dtid */
    0,                   /* base_coltype */
    255,                 /* length */
    0,                   /* status */
    1,                   /* length_err_act */
    'CHAR',              /* mask */
    0,                   /* scale */
    0,                   /* default_len */
    '',                  /* default_val */
    0,                   /*-delim_pre_len-*/
    '',                  /* delim_pre */
    0,                   /*-delim_post_len-*/
    '',                  /* delim_post */
    0,                   /* min_boundary_len */
    '',                  /* min_boundary */
    3,                   /* min_boundary_err_act */
    0,                   /* max_boundary_len */
    '',                  /* max_boundary_err_act */
    0                    /* rowtype */
    )
    go
  3. Restart Replication Server.
  4. In Replication Server, test the new type:
    admin translate, 'The quick brown fox jumped over the lazy 
    dog.', 'char(255)', 'rs_oracle_udd'
    go
    Delimiter Prefix   Translated                  Value Delimiter Postfix
    ----------------------------------------------------------------------
    NULL               The quick brown fox jumped over the lazy dog.  NULL

The new type is defined correctly if the sentence translates correctly.

Related concepts
Replication Server and RSSD Scripts