Name

REPL_SERVER — defines a server that will participate in replication

Synopsis

REPL_SERVER ( in server_name varchar ,
  in dsn varchar ,
  in replication_address varchar );
 

Description

This function defines a server that will participate in replication. The name is a symbolic name that should match the name specified as the ServerName configuration parameter in the replication section of the virtuoso.ini file of the server being defined. The address is the <host:port> where the server designated by the name is listening. The DSN is an ODBC data source name referring to the server, so that the subscriber can retrieve schema and other information. Note that replication communication itself does not take place through ODBC but that ODBC access to the publisher is required to initiate the subscription. In order to subscribe to publications from a server the server must first be declared with this function. If this function is called to define the local server, i.e. the given server name is the ServerName in the Replication section of the local ini file the function has no effect.

Parameters

server_name

unique replication server name of publisher (specified in [Replication] -> [ServerName] section in ini file of publisher).

dsn

data source name of publisher.

replication_address

host:port pair of publishing server where this subscriber will connect to.

Example

Example 24.329. Adding a new publisher server

This is to define a new publisher server in the subscriber's Database. The DSN of publisher is named 'Virtuoso 1111', so it is started on the same machine on port 1111.

SQL> DB.DBA.REPL_SERVER ('demo-pub', 'Virtuoso 1111', '127.0.0.1:1111');