Shareplex requires the use ofenvironment variables SP_COP_TPORT and SP_COP_UPORT that represent the TCP and UDP port respectively. The questions arises as to what are the port numbers, are they specific to Shareplex and what significance they havewith respect to the server, network communication, etc.
Informational solution about significance of port numbers in communication involving Shareplex.
Computers communicate with each other over the network via a port. In order for a computer to connect to the internet to communicate with other computers the transmission standard TCP/IP was created. TCP/IP short for Transmission Control Protocol/Internet Protocol is a host of communication protocols. The protocol does not depend on computers operating system, making communications between different OS possible. TCP/IP is used to connect hosts on the internet, it also transport data over a network. Every computer with internet access has an IP address. An IP address is similar to a street address in that it identifies where your home is located at. When a server or computer sends out data packets across network, the packet has the embedded IP address of the originator as well as the port number. Thus the port is not a physical entity on the server (such as a connection at the back of the server) but rather a logical entity. In Shareplex replication, this port number has the significance in that the packet will be received by the target server whose port number (SP_COP_TPORT or SP_COP_UPORT setting) matches with that of the originating (or source) server.
The following about port numbers is useful from Shareplex perspective:
1.Port numbers can range from 0 to 65535. However, from 0 to 1023, they are meant to be used by privileged services and are designated as well-known ports. This reservation is made as per the guidelines of Internet Assigned Numbers Authority. For Shareplex replication, we use the port numbers from 1024 and up (the upper limit is 65535).
2.In order for the source server to be able to connect to the target server, it is imperative that they are configured with identical values for the port #s. Namely the value for SP_COP_TPORT and SP_COP_UPORT should be identical across source and target. This also applies to the complex topologies like one to many, many to many, or many to one (also termed as data distribution, multi-master and centralized reporting, respectively).
3.For cascading replication, where data may be replicated from one server to next and beyond (across many source/target pair), the port # between subsequent pairs can be same or can differ with respect to the previous pair. For example, if replicating from server A to server B and then from server B to server C, then one can have the port for the first pair set at, say 2100, and have the port for the second pair set to this value of 2100 or select another value, say 2200. The option of selecting the same port # versus different port #s across one pair and the downstream pair has their own pros and cons. See Shareplex Admin Guide for details.
4.A port number is only a means to send the data packets across the network. The data packet here refers to the Shareplex queue data. It is possible to change the port number of an existing replication stream without impacting the replication. All that is needed to be doneis shutdown Shareplex cleanly on both source and target, change the value for the environment variables SP_COP_TPORT and SP_COP_UPORT on both source and target, and then restart Shareplex with this new environment setting. See Solution # SOL25822 for details.
5.It is always a good practice to check and see if the port # envisaged for the proposed replication is available or not. If the port # planned to be used for the new replication is already used by another replication stream, or for that matter used by another application, then the new Shareplex instance will complain about the port not being available. See Solution # SOL41015 for details on how to determine if a port is available. The error System call error: Address already in use tcp server bind - exiting is observed when attempting to start sp_cop on a port already used by another application. See SOL28907 for details on this error.
6.When running Shareplex in a firewall environment, ensure that the port selected for replication is open for two way TCP and UDP communication. Shareplex uses TCP for sending data across network from source to target instance. It also uses UDP protocol for certain functions that are important for replication. The two way communication is required for hand shaking purposes. They include acknowledgement received by Export process that its earlier communication was received by Import, the acknowledgement received by compare server that the message sent to target to spawn the compare client was successful, etc.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center