pdb_get_table_md

Returns a list of columns in a table from the primary database.

Syntax

pdb_get_table_md ownername, tablename

Parameters

Examples

Usage

  • Use pdb_get_table_md result to get the column metadata, including the Replication Server type mapping, for the specified table.

    The metadata contains a row for each column that includes the column name, ID, length, scale, primary database type, Replication Server type, whether the column is nullable, and whether the column is a primary key or part of a unique index.

    For numeric types, the precision is described in the length column.

    The Replication Server type includes the length for applicable binary and character types. Replication Agent pads the length for the applicable character types to account for any additional SAP Replication Server storage requirement for characters if the primary database character set is:
    • Different from the SAP Replication Server character set.
    • Single byte, while the SAP Replication Server character set is multibyte.
  • You can execute pdb_get_table_md in any Replication Agent state.

  • pdb_get_table_md returns an error if Replication Agent cannot connect to the primary database or SAP Replication Server, or if the SAP Replication Server primary database connection is not available.

See pdb_get_tables, pdb_get_columns, and pdb_get_primary_keys in the Replication Agent Reference Manual.