Returns the login name of the primary database Maintenance User currently stored in the Sybase Replication Agent transaction log.
For Oracle, the value is stored in the RASD.
ra_maintid
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 the Replication Server (using the alter connection command), Replication Server automatically sends the new Maintenance User login name to the Sybase Replication Agent, if the Sybase Replication Agent is in Replicating state.
Each time the Sybase Replication Agent goes into Replicating state, it automatically retrieves the primary database Maintenance User login name from the primary Replication Server, and stores it in the Sybase Replication Agent transaction log.
When ra_maintid is invoked, it returns the login name of the primary database Maintenance User stored in the Sybase Replication Agent transaction log, as follows:
Maintenance User ---------------- SYS (1 row affected)
If ra_maintid is invoked when the Sybase Replication Agent is in Replicating state, it always returns the correct Maintenance User login name.
If ra_maintid is invoked when the Sybase Replication Agent is in Admin state, it may not return the correct Maintenance User login name, because the Maintenance User login name could have changed in the Replication Server after the last time the Sybase 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 Sybase Replication Agent Log Reader component filters out data-changing operations applied by the Maintenance User.
If ra_maintid is invoked when the primary database connection is down, it returns an error.
The ra_maintid command is valid when the Sybase Replication Agent instance is in either Admin or Replicating state.