cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Kepware data logger sql connection failed

SS_9319257
2-Explorer

Kepware data logger sql connection failed

Hello community, 

 

I'm using kepware with Datalogger connecting to a SQL Server.

When Kepware runs the data logger, the following error occurs.

 

Log group  ~ Unalbe to connect to data source 'Kepware_DB_TEST'. Reason : SQL server does not exist or access denied. Connection Open(Connect()).

 

Kepware and the database are on the same IP subnet, and SQL Server Express is being used. I requested the company to open SQL port 1433, but they said it's meaningless because they are on the same subnet with only the last octet different. I'm not sure what I should be checking.

 

When I performed a telnet test from the Kepware server to the database server on port 1433, I received the error message: 'Could not open connection to the host, on port 1433: Connect failed.'

 

Any suggestions or things I should check would be greatly appreciated.

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @SS_9319257 

 

You're on the right track — the error points to a connectivity or SQL Server configuration issue, not just a subnet-related issue. Even if both machines are on the same subnet, port 1433 must still be open, and SQL Server must be configured correctly to accept TCP connections.

 

1. SQL Server Configuration:

Enable TCP/IP Protocol:

  1. Open SQL Server Configuration Manager.
  2. Go to SQL Server Network ConfigurationProtocols for MSSQLSERVER.
  3. Make sure TCP/IP is enabled.
  4. Double-click TCP/IP → Go to the IP Addresses tab.
  5. Scroll to the bottom to IPAll:
    • Ensure TCP Port is set to 1433.
  6. Restart the SQL Server service after applying changes.

2. SQL Server Browser and Named Instances

If you're using a named instance (like .\SQLEXPRESS), SQL Server Browser service must run to resolve the instance name to a port.

  • Open services.msc
  • Find SQL Server Browser → Start it.
  • Also, check your Data Logger connection string. If it uses a named instance, try switching to the IP and port.

3. Firewall Settings

Even on the same subnet, Windows Firewall can block connections.

On the SQL Server machine:

  1. Open Windows Defender Firewall with Advanced Security.
  2. Inbound Rules → Add New Rule:
    • Port → TCP → Port 1433 → Allow Connection → Apply to all profiles.
  3. Also, allow UDP port 1434 if using named instances.

4. Verify SQL Server is Listening on Port 1433

Run the following in Command Prompt on the database server:

netstat -an | find "1433"

You should see something like:

TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
 
Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

View solution in original post

2 REPLIES 2

Hi @SS_9319257 

 

You're on the right track — the error points to a connectivity or SQL Server configuration issue, not just a subnet-related issue. Even if both machines are on the same subnet, port 1433 must still be open, and SQL Server must be configured correctly to accept TCP connections.

 

1. SQL Server Configuration:

Enable TCP/IP Protocol:

  1. Open SQL Server Configuration Manager.
  2. Go to SQL Server Network ConfigurationProtocols for MSSQLSERVER.
  3. Make sure TCP/IP is enabled.
  4. Double-click TCP/IP → Go to the IP Addresses tab.
  5. Scroll to the bottom to IPAll:
    • Ensure TCP Port is set to 1433.
  6. Restart the SQL Server service after applying changes.

2. SQL Server Browser and Named Instances

If you're using a named instance (like .\SQLEXPRESS), SQL Server Browser service must run to resolve the instance name to a port.

  • Open services.msc
  • Find SQL Server Browser → Start it.
  • Also, check your Data Logger connection string. If it uses a named instance, try switching to the IP and port.

3. Firewall Settings

Even on the same subnet, Windows Firewall can block connections.

On the SQL Server machine:

  1. Open Windows Defender Firewall with Advanced Security.
  2. Inbound Rules → Add New Rule:
    • Port → TCP → Port 1433 → Allow Connection → Apply to all profiles.
  3. Also, allow UDP port 1434 if using named instances.

4. Verify SQL Server is Listening on Port 1433

Run the following in Command Prompt on the database server:

netstat -an | find "1433"

You should see something like:

TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
 
Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

Hello @SS_9319257

 

It looks like you have a response from our community champion. If it helped to answer your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements


Top Tags