test_connection

Tests Replication Agent connection configurations and network connectivity.

Syntax

test_connection [conn_name]
Note: (For Oracle only) When Replication Agent is configured to connect to ASM (an asm_tns_connection is configured with a non-null value that is not the default value), test_connection includes an additional line of output that describes the version of ASM being connected to. When asm_tns_connection is not configured, no ASM entry is listed in test_connection output.

Parameters

Examples

Usage

  • When test_connection is invoked with no option, Replication Agent tests all of its connections by attempting to log in to the corresponding server for each connection, using the connection parameters stored in its configuration file.

  • When test_connection is invoked with either of the keyword (RS or PDS), Replication Agent tests the specified connection.

  • The test_connection command verifies both network connectivity and the following Replication Agent connection configuration parameters for the primary database:
    • connection type (connectivity driver and protocol) – pds_connection_type

    • database name – pds_database_name

    • data server name – pds_server_name

    • Data source name (ODBC drivers only) – pds_datasource_name

    • host machine name – pds_host_name

    • port number – pds_port_number

    • user login access – pds_password and pds_username

    Note: The test_connection command does not validate Replication Agent user login permissions in the primary database. It verifies only that the user login and password specified in the pds_username and pds_password parameters can log in to the primary data server.
  • The test_connection command verifies both network connectivity and the following Replication Agent connection configuration parameters for the primary Replication Server (and RSSD, if so configured):
    • Database name – rssd_database_name (RSSD only)

    • Replication Server data source (as specified in the Replication Server primary database connection) – rs_source_db and rs_source_ds (Replication Server only)

    • Host machine name – rs_host_name (and rssd_host_name)

    • Network packet size – rs_packet_size (Replication Server only)

    • Port number – rs_port_number (and rssd_port_number)

    • User login access – rs_password, rs_username (and rssd_password and rssd_username)

    Note: The test_connection command verifies that the Replication Agent user login (specified in the rs_username and rs_password parameters) has connect source permission in the primary Replication Server.
  • The test_connection command returns the connection type and its status, as follows:
    Type            Connection
    ----            ----------
    PDS             succeeded
    RS              succeeded
    
    (2 rows affected)
    If the connection status is failed, it indicates one of the following:
    • The Replication Agent connection configuration parameters are not set correctly.

    • A network failure or communication error prevents the connection.

    • The server associated with the connection is down.

  • If the connection status is failed, check the Replication Agent system log to determine the cause of the failure.

    Note: You may also need to check the system log of the server associated with the connection to determine the cause of the failure.
  • See the Replication Agent Administration Guide for information about setting up Replication Agent connection configuration parameters.

  • See Configuration Parameters for information about specific connection configuration parameters.

  • The test_connection command is valid when the Replication Agent instance is in the Admin, Replicating, or Replication Down states.

Related concepts
Configuration Parameters
Related reference
ra_config
ra_statistics
ra_status