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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Read data from SQL database a write to KepserverEx via ThingWorx

juniorI4
7-Bedrock

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

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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

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
slangley
23-Emerald II
(To:juniorI4)

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

Announcements


Top Tags