Returns the name of the Replication Server maintenance user ID for the primary database connection.
ra_maintid
ra_maintid
This command returns the Replication Server maintenance user ID currently stored in the Replication Agent transaction log, as shown below:
Maintenance User
----------------
SYS
(1 row affected)
Replication Server requires a maintenance user ID for each database connection. Each maintenance user ID is associated with a specific Replication Server database connection. The maintenance user ID for each database connection is defined with the Replication Server create connection command.
The filter_maint_userid configuration parameter is provided to support bidirectional replication, wherein the primary database is also 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 Replication Server maintenance user ID are not replicated. The Log Reader component filters out the Replication Server maintenance user ID when it reads the transaction log.
If ra_maintid is invoked when the primary database connection is down, it returns an error message.
The ra_maintid command is valid when the Replication Agent instance is in either Admin or Replicating state.
Each time the Replication Agent goes to Replicating state,
it retrieves the maintenance user ID from the primary Replication
Server. If you invoke the ra_maintid command
when the Replication Agent is in the Admin state,
the value retrieved from the transaction log may not be correct.
The correct maintenance user ID is always returned if you invoke the ra_maintid command
when the Replication Agent is in the Replicating state.
ra_config, ra_statistics