ra_maintid

Returns the login name of the primary database maintenance user.

Syntax

ra_maintid

Usage

  • Replication Server requires a maintenance user login name for each database connection. The maintenance user login name for a database connection is specified with the Replication Server create connection or alter connection command.

    When the primary database maintenance user login name is changed in Replication Server (using the alter connection command), Replication Server automatically sends the new maintenance user login name to Replication Agent, if Replication Agent is in Replicating state.

    Each time Replication Agent goes into Replicating state, it automatically retrieves the primary database maintenance user login name from the primary Replication Server, and caches it.

  • When ra_maintid is invoked, it returns the login name of the primary database maintenance user that is cached, as follows:
    maintenance user
     ----------------
     SYS
    (1 row affected)
  • If ra_maintid is invoked when Replication Agent is in Replicating state, it always returns the correct maintenance user login name.

    If ra_maintid is invoked when Replication Agent is in Admin or Replication Down state, it may not return the correct maintenance user login name, because the maintenance user login name could have changed in Replication Server after the last time Replication Agent retrieved the value and stored it.

  • The filter_maint_userid configuration parameter is provided to support bidirectional replication, wherein the primary database also acts as a replicate database that has transactions applied to it by a Replication Server.

    If the value of the filter_maint_userid parameter is true, database operations applied by the maintenance user are not replicated from the primary database. When it reads the transaction log, the Replication Agent Log Reader component filters out data-changing operations applied by the maintenance user.

  • The ra_maintid command is valid when the Replication Agent instance is in the Admin, Replicating, or Replication Down state.

Related reference
ra_config
ra_statistics