Skip to main content
14-Alexandrite
April 21, 2023
Solved

Unable to connect to Thingworx Database on local instance

  • April 21, 2023
  • 1 reply
  • 2139 views


Hi All,

I have recently installed Thingworx 9.3.7 on MSSQL 2019 with DB name as ThingworxHome as a persistence provider.
Also I created 1 DB thing on same as ThingworxExt to test sql queries from platform. I am not able to establish connection.
I am sharing details as below along with screenshots: 

JDBC Driver Class Name : com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC Connection String : jdbc:sqlserver://127.0.0.1:1433;databaseName=ThingworxExt
connectionValidationString : SELECT NOW()
Database User Name : Twadmin
Password : 123xxx

Any suggestion to track and trace how I can confirm all my settings are correct or not.

 

Thank you in advance,
Sid

 

Best answer by slangley

Hi @Siddharth_Jhs.

 

Please confirm my understanding.  ThingWorx is running successfully, but you're unable to make a secondary connection to another SQL Server database running on the same SQL Server instance?

 

I noticed in the screenshot of your connection information, the connectionValidationString needs to be updated for SQL Server.  Change it to:

 

SELECT GETDATE()

 

Also make sure to update the database password field.

 

Please let me know if you still have issues.

 

Regards.

 

--Sharon

 

 

1 reply

slangleyCommunity ManagerAnswer
Community Manager
April 21, 2023

Hi @Siddharth_Jhs.

 

Please confirm my understanding.  ThingWorx is running successfully, but you're unable to make a secondary connection to another SQL Server database running on the same SQL Server instance?

 

I noticed in the screenshot of your connection information, the connectionValidationString needs to be updated for SQL Server.  Change it to:

 

SELECT GETDATE()

 

Also make sure to update the database password field.

 

Please let me know if you still have issues.

 

Regards.

 

--Sharon

 

 

14-Alexandrite
April 21, 2023

Hi Sharon,

Thanks for your quick reply. It seems I was passing wrong input to connectionValidationString  because of which it was not establishing connection. Now after updating same, it works.

Also could you please explain why  jdbc extension import is required which is mentioned in following link :

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Extensibility/jdbc_extension.html#

if we are able to establish connection with my database without importing it in /Tomcat folder/webapps/Thingworx/WEB- INF/lib folder.

Community Manager
April 21, 2023

Hi @Siddharth_Jhs.

 

You're using SQL Server as your persistence provider, so the jdbc driver is already on your system.  Therefore, you won't need the jdbc extension.

 

The jdbc extension can be used to simplify the setup when connecting to other 3rd party databases.

 

Regards.

 

--Sharon