This article explains how to change the TCP/IP port that DataGate for SQL Server (DSS). By default, DSS uses port 5042. That port number is defined in the registry and to change the port number you need to change that key’s value.
Interesting minutiae: the port number 5042 isn’t arbitrary. It was assigned by the Internet Assigned Numbers Authority to ASNA as DataGate’s formal port number a very long time ago! Search this link for 5042.
Danger ahead! Incorrect changes to your PC's registry can render your PC unusable. A PC administrator familiar with changing the registry should make these changes.
Step 1.
Ensure all users are logged out and stop the DG Service on the server. The quick way is by with the “A” tray icon. Right-click and select “Stop the Service” as shown below in Figure 1.
Alternatively, you can use Windows’s services panel to end the DataGate as shown below in Figure 2a.
Step 2.
Open the Windows Registry Editor, a.k.a. regedit.exe. Navigate to the DG Service key. The “17” in the key name could be different, depending on the installed version of DSS.
The full key name is:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDataGate Server 17
The DataGate registry key is shown below in Figure 2b.
Step 3.
In the right-hand pane, find and double-click the value name “TCP/IP Port”. The “Edit DWORD” dialog should appear. Set the “Base” radio button to “Decimal” and change the”Value data” input to your desired port number (as shown below in Figure 3).
Click “OK” and close the Registry Editor.
Step 4.
Restart the service using either the DataGate dialog as shown below in Figure 4 or use the services panel shown in Figure 2b.
DataGate for SQL Server’s port is now changed and its ready to use. Be sure to put this changed port number in your DataGate Database names.