• No results found

Replication Server keeps track of other components in a replication system using connections that identify primary and replicate databases and routes that identify other Replication Servers.

Since Replication Server was originally designed for Adaptive Server Enterprise database replication, the definition of a connection in Replication Server follows the SAP standard of server name.database name. For example, a Replication Server connection to an Adaptive Server named ASE1 and database PUBS is named ASE1.PUBS.

To connect to a primary non-ASE data server, Replication Server allows a connection from a Replication Agent on behalf of the non-ASE primary database. For a replicate database, Replication Server connects to an ECDA database gateway, which in turn connects to the non-ASE replicate data server. For Oracle or SAP HANA Database, Replication Server can also connect directly to the replicate data server using ExpressConnect. Since Replication Agents, ECDA gateways, and ExpressConnect are not data servers, the Replication Server connection properties for those components may have different meanings than they do for a database server connection.

A single Replication Server connection can support data flow in either one or two directions. Data flows in through a Replication Server connection by way of the Replication Agent user thread. Data flows out through a Replication Server connection by way of the Data Server Interface (DSI) thread. Each Replication Server connection can support either outbound data flow only (through the DSI thread), or both inbound and outbound data flow (through the Replication Agent User and DSI threads).

Replication Agent User Thread

Replication Server receives all data-change operations or transactions to be replicated from a primary data server through the Replication Agent User thread of the database connection for that data server.

Every primary database that supplies transactions to be replicated must be represented by a Replication Server database connection with an enabled Replication Agent User thread. Replication Server establishes a connection directly with the primary database, if it resides in an Adaptive Server. If the primary database resides in a non-ASE data server, a separate Replication Agent component communicates with the Replication Server, using a Replication Agent User thread connection, on behalf of the primary database.

Note: Replication Server never attempts to connect to the Replication Agent User thread of a connection. The only entity that can initiate communication to a Replication Agent User thread is the primary data server or the Replication Agent.

On a Replication Agent User thread, the primary data server or Replication Agent is the client, and the primary Replication Server is the server.

DSI Thread

The DSI thread of a Replication Server connection is where the replicated transaction is delivered by Replication Server.

Every replicate database expected to receive replicated transactions must be represented by a Replication Server connection with an enabled DSI thread.

Replication Server establishes a connection directly with the replicate database, if it resides in Adaptive Server. If the replicate database resides in a non-SAP data server, Replication Server communicates using:

• An ECDA database gateway by way of the connection’s DSI thread, or,

• ExpressConnect to establish a connection directly with the Oracle or SAP HANA replicate database.

Note: A replicate data server or database gateway never attempts to connect to the DSI thread of a connection. The only entity that can initiate communication to a DSI thread is the Replication Server.

On a DSI thread, the Replication Server is the client, and the replicate data server or database gateway is the server.

Maintenance User Purpose

The maintenance user inserts, deletes, and updates rows in replicated tables, and executes replicated stored procedures. The database owner (or system administrator) must grant the permission required for the maintenance user to perform these tasks.

To update replicated data, Replication Server logs in to the replicate data server as the maintenance user. In an Adaptive Server replicate database, rs_init automatically creates the user ID for the Replication Server maintenance user and adds the user to the replicate database.

The maintenance user ID and password are defined to Replication Server automatically with the Replication Server create connection command for the replicate database. If you change the password for the maintenance user ID in the data server, you can use the Replication Server

alter connection command to change the password for the Replication Server connection. The Replication Server maintenance user must also have permission to access the rs_lastcommit and rs_info system tables in the replicate database, and any stored procedures that use those tables.

rs_init does not grant database permissions to the maintenance user for user tables and stored procedures. You must grant database permissions on replicated tables and stored procedures before you can replicate transactions for replicated tables or replicate executions of the replicated stored procedures. For each table replicated in the database, and for each stored procedure executed due to replication run:

Alternatively, you can assign the maintenance user ID (maint_user) to a database administrator role, if that role has the required authority on all replicate objects.