Skip to main content
1-Visitor
December 18, 2018
Question

Issue while Connecting MS SQL Server with Thingworx

  • December 18, 2018
  • 1 reply
  • 12031 views

I am trying to connect SQL Server (Installed on my laptop) with ThingWorx (manufacturing APP). I am facing this error when trying to execute the service. I am using Windows authentication to log into the SQL Server so I am not setting any Username and Password in the Configuration of Thing.

1 reply

Support
December 18, 2018

Hi @Harsha616.

 

When you say you are trying to connect SQL Server with ThingWorx, are you saying you are trying to configure SQL Server as a data provider?  If so, take a look at the Relational Database Connectors available on PTC Marketplace.

 

You also may need to run SQL Server in mixed authentication mode, and set up a SQL Server user for accessing your data.

 

Regards.

 

--Sharon

Harsha6161-VisitorAuthor
1-Visitor
December 18, 2018

Hi slangley,

Thanks for your reply, I have downloaded the MSSQL and JDBC connectors from the PTC Marketplace and imported them using composer. I also tried creating a new user in MS SQL Server still getting the same error. Sharing the configuration details below for your reference.

I also tried changing the authentication mode to "SQL Server Authentication" but still getting error.

 

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

JDBC Connection String: jdbc:sqlserver://localhost;databaseName=Coffee

connectionValidationString: SELECT GETDATE()

Database User Name: TWAdmin   ---(Created a user in SQL Server)

Support
December 18, 2018

Hi @Harsha616.

 

Your connection string is missing the port.  The default for SQL Server is 1433 but, of course, this can be changed so you will need to validate for your implementation.

 

Regards.

 

--Sharon