pdb_convert_datetime

Determines whether Replication Agent converts non-Sybase temporal datatype values to the Sybase datetime format.

Note: This parameter has been deprecated. If you use Replication Server version 12.0 or later, use the Replication Server heterogeneous datatype support (HDS) feature for all datatype conversion and translation.

Default

false

Values

true – Replication Agent converts all data in the primary database native date/time datatypes to the Sybase datetime format.

false – Replication Agent replicates data in the primary database native date and time datatypes as character strings.

Comments

  • The pdb_convert_datetime parameter is provided for backward compatibility with previous versions of Replication Agents and Replication Server. If you use Replication Server version 12.0 or later, use the Replication Server heterogeneous datatype support (HDS) feature for all datatype conversion and translation.

  • Replication definitions created by the rs_create_repdef command always define the datatypes using available user defined datatypes (UDDs) that are installed in Replication Server. If you use the rs_create_repdef command, do not set the Replication Agent configuration parameter pdb_convert_datetime to true, as doing so converts date and timestamp datatypes to Sybase format, instead of UDD format.

  • Replication Agent checks the value of the pdb_convert_datetime parameter at the time an object is marked for replication. Transaction log objects that support replication of the marked object are constructed to provide the desired date format.

    If you change the value of the pdb_convert_datetime parameter after an object is marked, it has no effect on the marked object. To change the datetime datatype conversion for a marked object, you must unmark the object, change the value of the pdb_convert_datetime parameter, then re-mark the object.

  • For log-based Replication Agents, the conversion takes place after the log records have been read and before LTL is generated to send to Replication Server.

  • Any missing component in the non-Sybase date/time datatype format is treated as an implied 0 (zero) when it is converted to the Sybase datetime format.

  • When the value of the pdb_convert_datetime parameter is true, the replication definition for each table should specify that the declared datatype for all date/time columns is datetime.

  • If the value of the pdb_convert_datetime parameter is false, Replication Agent sends date/time data to the primary Replication Server as character strings. The character string size varies by database and datatype:
    • Oracle: DATE = char(19)

    • Microsoft SQL Server: datetime or smalldatetime = char(23), timestamp = binary(8)

    • DB2 Universal Database: DATE = char(10), TIME = char(8). For TIMESTAMP, the character string size is the same as the user input.

  • Set the value of the pdb_convert_datetime parameter to true if all date/time values replicated from the primary database will be replicated as the Sybase datetime datatype.

  • pdb_convert_datetime must be false if a table containing replicated LOB columns has datetime datatype in the primary key.

  • Replication Agent date/time datatype conversion does not work with LOB column replication, unless either of the following conditions exist (these conditions are not required for Oracle and Microsoft SQL Server):
    • There are no date/time columns in the tables that have LOB column replication enabled, or

    • The primary keys in tables that have LOB column replication enabled do not contain date/time datatypes.

    Otherwise, if you use the pdb_setrepcol command to enable LOB column replication, you must set the value of the pdb_convert_datetime parameter to false.

    Replication Agent for UDB is the only Replication Agent that must query LOB data directly from the primary database. To successfully query a primary database table for a LOB column value, any date column value must retain the primary database format and structure for the date value to appear correctly in the query. The format and structure for the date value cannot be converted to the Sybase datetime format.

  • Set the value of the pdb_convert_datetime parameter to false for better Replication Agent throughput performance and optimal datatype handling.

  • If pdb_convert_datetime is true and there are DB2 Universal Database parameterized TIMESTAMP values, the resulting datetime value has a precision of 3, regardless of the TIMESTAMP precision parameter. For example, if TIMESTAMP(0) is used for the value 2012-05-20 10:15:45, the datetime value is 2012-05-20 10:15:45:000. If TIMESTAMP(12) is used for the value 2012-05-20 10:15:45:123456789012, the datetime value is 2012-05-20 10:15:45:123.