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

Read data from SQL database a write to KepserverEx via ThingWorx

SOLVED
Highlighted
Regular Member

Read data from SQL database a write to KepserverEx via ThingWorx

Hi all,

i am new in thingworx. I would like to read data from SQL db and write to OPC via THX. Could you, please, help how?

I connect successfully OPC to TWX

I try connect MS SQL 2014 to THX via Relational DB extension, but I have some troubles - Unable to Invoke Service test on SQL : null 

JDBC Driver Class Name com.microsoft.sqlserver.jdbc.SQLServerDriver

jdbc:sqlserver://localhost:8080;databaseName=thingworx 

Error Getting Tables : The TCP/IP connection to the host localhost, port 8080 has failed. Error: "The driver received an unexpected pre-login response. Verify the connection properties and check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. This driver can be used only with SQL Server 2000 or later."

If I try port 1433: firewall is off

Error Getting Tables : The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."

 

Could you please help with SQL connection to THX and how to send data to OPC from SQL via THX ?

 

Gracias

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Read data from SQL database a write to KepserverEx via ThingWorx

The issue with SQL connection solved. Issue was in the connection string... instead of "localhost" I used exact PC´s name Now I need to solve how to automatically read data from MSSQL and write to OPC and VV. Thanks
3 REPLIES 3

Re: Read data from SQL database a write to KepserverEx via ThingWorx

Are you sure that MS Server is listening to port 1433 ? Can you access it from an other JDBC based application (e.g. DbVisualizer).

 

Using Sql Server Configuration manager > Sql Server Network configuration, verify that TPC/IP is enabled. Also review the TCP/IP properties in there, see https://kb.sos-berlin.com/pages/viewpage.action?pageId=17499564 for example

Re: Read data from SQL database a write to KepserverEx via ThingWorx

The issue with SQL connection solved. Issue was in the connection string... instead of "localhost" I used exact PC´s name Now I need to solve how to automatically read data from MSSQL and write to OPC and VV. Thanks

Re: Read data from SQL database a write to KepserverEx via ThingWorx

Hi @juniorI4.

 

Since you found and posted the solution to the problem, please mark your last response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon