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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Problems connecting ThingWorx 9.2 to a external SQL server without using an external extension.

GerardAlonso
6-Contributor

Problems connecting ThingWorx 9.2 to a external SQL server without using an external extension.

I followed this article to configure my database thing: https://www.ptc.com/en/support/article/cs318728

 

I got the database configured but when i try to run services to check the connection (the query that i'm trying is SELECT GetDate()) the following error returns: "Unable to Invoke Service RunDatabaseQuery on DatabaseConnection : Execute Query failed: java.sql.SQLException: Cannot get a connection, pool error Timeout waiting for idle object"

 

Don't know what may be wrong I used the following configuration for the database thing

Captura.PNG

And the property tab looks like this

Captura.PNG

 Please let me know if you need more information to help me

ACCEPTED SOLUTION

Accepted Solutions

@GerardAlonso , I have a few clarifying notes / suggestions...

 

1) Just to double-check... Since you're using jTDS driver for MS SQL, are you using a compatible SQL version? AFAIK, it only supports up to SQL Server 2012

 

2) To narrow down the cause, I'd suggest to take Microsoft's JDBC driver (7.4 for ThingWorx 9.0+) and check if it works with it.

I've just tested with sqljdbc_7.4.1.0 and attached the config tab of my database thing.

If it works, the issue is probably related to jTDS driver.

If it still doesn't work, something is probably wrong with your database Thing configuration or network.

 

Below is my full JDBC Connection String since it's not seen on the screenshot.

jdbc:sqlserver://192.168.1.17:1433;databaseName=twtest;applicationName=Thingworx;

 

TWSQL.PNG

View solution in original post

4 REPLIES 4
slangley
23-Emerald II
(To:GerardAlonso)

Hi @GerardAlonso 

 

I noticed you entered net.sourceforge.jtds.jdbc.Driver for the JDBC Driver Class Name.  Which jdbc driver did you install? 

 

Regards.

 

--Sharon

GerardAlonso
6-Contributor
(To:slangley)

Hi @slangley 

 

I followed this guide to configure the databse thing:

https://developer.thingworx.com/en/resources/guides/external-databases/external-database-connection

 

The configuration mentioned in this article  https://www.ptc.com/en/support/article/cs318728 was not working for me

 

Regards,

 

Gerard

@GerardAlonso , I have a few clarifying notes / suggestions...

 

1) Just to double-check... Since you're using jTDS driver for MS SQL, are you using a compatible SQL version? AFAIK, it only supports up to SQL Server 2012

 

2) To narrow down the cause, I'd suggest to take Microsoft's JDBC driver (7.4 for ThingWorx 9.0+) and check if it works with it.

I've just tested with sqljdbc_7.4.1.0 and attached the config tab of my database thing.

If it works, the issue is probably related to jTDS driver.

If it still doesn't work, something is probably wrong with your database Thing configuration or network.

 

Below is my full JDBC Connection String since it's not seen on the screenshot.

jdbc:sqlserver://192.168.1.17:1433;databaseName=twtest;applicationName=Thingworx;

 

TWSQL.PNG

Hi @DmitryTsarev 

 

Thank you very much for you suggestion and clariffications, I used the JDBC driver that you mention and now the database thing is working correctly.

 

Thanks,

 

Gerard

Announcements


Top Tags