CREATE REPLICATION CONNECTIONconnect‑name CONNECT TOconnect‑string USING NAMEusernamePASSWORDpassword [TIMEOUTsecs]
Access requirements
SYS_ADMIN_ROLE role
Usage
Use the CREATE REPLICATION CONNECTION statement to create a named connection from a target database server to a source database server.
The source database sees the replication connection as normal database connection, it is logged to the message log, seen in the user list, and traced with the ADMIN COMMAND 'trace' statement.
Replication connection statements are transactional, they need to be committed in order to become persistent and have effect.
▪ connect‑name: Name of the connection. The name must be unique inside the replicator target database.
▪ connect‑string: Connect string of the source database. Normally, it is a remote database connection over TCP. Transparent failover connect strings can be used to connect to a HotStandby (HSB) environment so that, in the case of HSB server failure or switchover, the replicator can switch automatically to the other server.
▪ username and password: Credentials of the user in the source database. The user must have the correct access to create the replication connection.
▪ timeout: Connection timeout. If not specified, the timeout uses the system-dependent default TCP connect timeout.
Return values
Error code
Description
26039
Failed to insert replication connection
26022
Incorrect subscription parameter (Too long connect string, user name, or password)
Example
CREATE REPLICATION CONNECTION conn1 CONNECT TO 'tcp 1323' USING NAME dba PASSWORD dba