solidDB Help : Replication : C Replicator : Managing replication : SQL in target database : Replication connection statements
  
Replication connection statements
Use the following SQL statements to manage replication connections:
CREATE REPLICATION CONNECTION, see CREATE REPLICATION CONNECTION
ALTER REPLICATION CONNECTION, see ALTER REPLICATION CONNECTION
DROP REPLICATION CONNECTION, see DROP REPLICATION CONNECTION
LIST REPLICATION CONNECTIONS, see LIST
DESCRIBE REPLICATION CONNECTION, see DESCRIBE REPLICATION
The CREATE REPLICATION CONNECTION statement defines the replication source connection and the name and password of the replicator user. After the connection is specified, the connection can be referenced by the replication subscriptions that connect to a given source database. The source database treats the replicator user connection as a normal database connection; the connection is logged in the message log, displayed in the user list, and can be traced by using ADMIN COMMAND ‘trace’.
Like any other user, the replicator user must be granted access to the tables that are replicated over the connection. In addition, the replicator user must be granted access to the replication partitions, see Access rights for replication.
The same replication source connection can be used by multiple replication subscriptions.
Replication connection commands are transactional, they must be committed in order to become persistent and have an effect.
A table cannot be replicated with itself. However, different tables in the same database can be replicated with each other.
The following example shows a set of commands (and associated output) that create, list, describe, and then drop a connection:
solsql> CREATE REPLICATION CONNECTION conn1 CONNECT TO 'tcp 1323' USING NAME dba PASSWORD dba;
RESULT
------
0 rows fetched.

solsql> LIST REPLICATION CONNECTIONS;
RESULT
------
REPLICATION CONNECTIONS:
------------------------
CONN1
CONN_PART_01
TFEC_2XX_CONN_01

1 rows fetched.

solsql> DESCRIBE REPLICATION CONNECTION conn1;
RESULT
------
Connection: CONN1
 Connect string: tcp 1323
 UUID: ec9d2779-182f-4117-afdc-4a5bbcfdee0f
 User name: DBA
 Connect timeout: 0

1 rows fetched.

solsql> DROP REPLICATION CONNECTION conn1;
RESULT
------
0 rows fetched.
The UUID for the connection is the UUID of the source database and is set only after the first replication connection is made with the source database.
After the UUID for the connection is set, it is checked every time a connection is made to the source server. If the source server reports a different UUID on a subsequent connection, replication does not start and the following error is generated:
26026: Source connection UUID has changed.
Go up to
SQL in target database