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

Issue while Connecting MS SQL Server with Thingworx

Granite

Issue while Connecting MS SQL Server with Thingworx

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.

14 REPLIES 14

Re: Issue while Connecting MS SQL Server with Thingworx

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

Re: Issue while Connecting MS SQL Server with Thingworx

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)

Re: Issue while Connecting MS SQL Server with Thingworx

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

Re: Issue while Connecting MS SQL Server with Thingworx

Hi Sharon,

 

I tried the way as suggested but no luck.

 

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

 

Was there any limitation with Manufacturing App to connect with local Databases (SQL Server) or do I need to check on any permissions/authentications?

Re: Issue while Connecting MS SQL Server with Thingworx

Hi @Harsha616.

 

Once you added the port, did the error message change?  If so, please provide the error or attach the log.

 

I would recommend testing with the Administrator account to rule out a permission issue.

 

Regards.

 

--Sharon

Re: Issue while Connecting MS SQL Server with Thingworx

Hi Sharon,

 

I added the port and still facing with same error which I shared earlier, sharing the Log Message for your reference.

 

I logged in as Administrator only.

 

Thanks

Harsha

Re: Issue while Connecting MS SQL Server with Thingworx

Hi Sharon,

 

I added the port and still facing with same error which I shared earlier, sharing the Log Message for your reference.

 

I logged in as Administrator only.

 

Thanks

Harsha

Re: Issue while Connecting MS SQL Server with Thingworx

Hi @Harsha616.

 

Did you notice this message in the logs:

 

Error Getting Tables : Login failed for user '',

 

It looks like there is an issue with the credentials you are using for logging in to the database.

 

Regards.

 

--Sharon

Re: Issue while Connecting MS SQL Server with Thingworx

Hi @Harsha616.

 

Have you found a solution to your issue?  If so, and one of the previous posts helped to resolve it, please mark the appropriate one as the Accepted Solution.  If you found a solution not posted here, please post it and mark it as the Accepted Solution for the benefit of others with the same issue.

 

Thank you for using our Community!

 

Regards.

 

--Sharon