How to Enable TCP/IP Connections for SQL Server and Configure RedAnt to Use TCP

How to Enable TCP/IP Connections for SQL Server and Configure RedAnt to Use TCP

By default, some SQL Server installations use Named Pipes for database connectivity. In many environments this works without issue, but in some cases Named Pipes can lead to connection timeouts or intermittent connectivity problems after periods of inactivity. Using TCP/IP often provides a more stable and reliable connection.

This guide explains how to enable TCP/IP on your SQL Server and configure the RedAnt client to connect using TCP.

Prerequisites

Before you begin, ensure you have:

  • Administrative access to the SQL Server.
  • SQL Server installed and running.
  • SQL Server Configuration Manager available on the server.

Configure SQL Server

Open SQL Server Configuration Manager

  1. Press Windows Key + R.
  2. Search for SQL Server Configuration Manager from the Start menu and open it.

Enable TCP/IP

  1. Expand SQL Server Network Configuration.
  2. Select Protocols for MSSQLSERVER.
    • The instance name may differ depending on your SQL Server installation.
  3. In the right-hand pane, locate TCP/IP.
  4. Right-click TCP/IP and select Enable.
  5. Click Yes if prompted to restart the service later.

Restart the SQL Server Service

  1. Select SQL Server Services in the left-hand pane.
  2. Right-click the SQL Server instance.
  3. Select Restart.

Once the service has restarted, SQL Server will accept TCP/IP connections.

Configure the RedAnt Client

After TCP/IP has been enabled on the SQL Server, update the RedAnt client configuration to use TCP rather than Named Pipes.

Open the Configuration File

  1. On the client PC, navigate to **C:\RedAntPCS**.
  2. Double-click RedAntPCS.txt to open the configuration file.

Update the Server Connection String

The second line of the file contains the SQL Server connection information.

If the file currently contains redantserver\redant, change it to tcp:redantserver\redant.

If the file currently contains np:redantserver\redant, change it to tcp:redantserver\redant.

Save the File

Save the changes and close RedAntPCS.txt.

Summary

To improve connection stability:

  1. Enable TCP/IP in SQL Server Configuration Manager.
  2. Restart the SQL Server service.
  3. Update the RedAnt client configuration to use the tcp: prefix instead of np: or no protocol prefix.
  4. Save the configuration and restart the RedAnt client if required.

The RedAnt client will now connect to SQL Server using TCP/IP rather than Named Pipes, which can help eliminate timeout and connectivity issues experienced after periods of inactivity.