Skip to main content
1-Visitor
October 27, 2017
Solved

Unable to connect database thing to MSSQL DB

  • October 27, 2017
  • 2 replies
  • 6106 views

Hi

We have installed thingworx with mssql database. We created one Thing and selected "Database" as "ThingTemplate",  now in configuration tab we have filled the options as below :

jDBCConnectionURL =  jdbc:sqlserver://localhost:1433;databaseName=thingworx;

jDBCDriverClass = com.mysql.jdbc.driver

But the connection is not getting established, the property "isConnected" is showing as false only.

We can able to connect to the database through persistence provider with the same jDBCConnectionURL, so I think the problem is with the jDBCDriverClass.


we have tried DriverClass as below also:

jDBCDriverClass =  com.microsoft.sqlserver.jdbc.SQLServerDriver

Please let us know if we are missing any thing or using wrong driver class name for mssql.

This topic has been closed for replies.
Best answer by supandey

Thanks for clarifying . I could see the same behaviour until i imported the MSSQLConnector_Extension Relation Databases connectors

It appears the JDBC driver already included is not accessible like that, after importing the extension I created a Thing of ThingTemplate MSSqlServer (FYI this added sqljdbc jar in \\webapps\Thingworx\WEB-INF\extensions)

And following configuration :

Hope this'd help.

2 replies

5-Regular Member
October 27, 2017

Hi Aahlad, is MS SQL installed as persistence provider or you trying to connect to MS SQL via the RDBMS Extension? It looks like you are mixing two methods. If you are trying to connect via the RDBMS extension you'll need to create Thing of type MSSqlServer ThingTemplate

If you are are attempting to configure it for Persistence Provider it'll need to be done in platform-settings.json file in ThingworxPlatform folder

aallari1-VisitorAuthor
1-Visitor
October 27, 2017

Yes we are connecting MS SQL as persistence provider, it is done separately.

But here what we are doing is connecting thing which has "Databse" as base ThingTemplate to MsSQL.

So here all we need is the possible values of DriverClassName for MSSQL.

Please let us know what need to do to achieve this.

supandey5-Regular MemberAnswer
5-Regular Member
October 30, 2017

Thanks for clarifying . I could see the same behaviour until i imported the MSSQLConnector_Extension Relation Databases connectors

It appears the JDBC driver already included is not accessible like that, after importing the extension I created a Thing of ThingTemplate MSSqlServer (FYI this added sqljdbc jar in \\webapps\Thingworx\WEB-INF\extensions)

And following configuration :

Hope this'd help.

5-Regular Member
December 21, 2017

Were you able to solve this issue. I'm facing the same

Any information would be helpful

Arvind

5-Regular Member
December 21, 2017

Hi Arvind, could you please open a new thread, referencing this one and may be also attach the log files or screenshot on your configuration of the JDBC extension?