Skip to main content
1-Visitor
December 1, 2017
Solved

Making MSSQL as the Persistence Provider

  • December 1, 2017
  • 6 replies
  • 4956 views

Hi,

I am trying to make MSSQL Server 2014 as my data persistence provider as per the instructions provided at http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.5_hc/index.jspx?id=ConfiguringaPersistenceProviderEntity&action=…  but unfortunately, I am not able to do so. I receive an error message(please see attached pic). How can I solve this error?

Also when the instructions say import the PersistenceProvide package what exactly the instructions mean by that?

Best answer by cmorfin

Hi Tushar

I would like to step back to better understand what you are doing and if you actually need to do it.

My understanding is that you have downloaded the ThingWorx-Platform-Mssql-8-x-x media and installed it.

Is that correct ?

If that is the case the installation has already configured the ThingWorxPersistenceProvider to point to MSSqlServer.

You should be able to see it under DATA STORAGE > Persistence Providers, Advanced button tick Show System Objects.

So if you want to use one MS SQLServer there is nothing else for you to do.

You will only need to create a new persistence provider if you want to connect ThingWorx to a second different SQL Server.

Is that what you are trying to achieve ? (In which case you can probably get clues form the Configuration page of the ThingworxPersistenceProvider already created)

or are you using only one MS SQLServer ? (in which case you have no need to create a Persistence Provider.)

Thank you

Kind rgeards

Christophe

6 replies

20-Turquoise
December 1, 2017

Have you looked into have an MSSQL  as your model&data provider? Then you could deploy the MSSQL-based version of ThingWorx. I believe the link you tried to show in the helpcenter talks about that scenario.

Now, you may also connect MSSQL as your data provider, but the route would be described here Steps to connecting to your Relational Database and some more detail in here Re: Using a third party Jar file for Database connection

tyadav1-VisitorAuthor
1-Visitor
December 1, 2017

Hi,

I followed the steps in provided in the article Steps to connecting to your Relational Database using the JDBC extension. I was able to create the template but after configuring the thing created on the template, I am not able to test the service as mentioned in the guide.

The jdbc driver class name:  com.driverclassname.jdbc.Driver (default, as the above article, says that it is automatically created)

Connection String used: jdbc:sqlserver://localhost:<port number> ;databaseName=<databasename>;integratedSecurity=true;

and the connectionValidationString = select 1 (as mentioned in the above mentioned guide)

Is there some formatting or parameter error which is causing such an error?

The error which I am getting is Error loading tables. Please check your configuration.


Also the error in application logs is :2017-12-02 00:24:15.260+0100 [L: ERROR] [O: c.t.t.Thing] [I: TestDB] [U: Administrator] [S: ] [T: http-nio-8080-exec-1] ERROR starting: JDBC Driver Class Not Found: com.driverclassname.jdbc.Driver

19-Tanzanite
December 5, 2017

Hi Tushar

just wondering are you really usign com.driverclassname.jdbc.Driver for the driver classname or is that a way to represent it ?

I think you should be using com.microsoft.sqlserver.jdbc.SQLServerDriver for MS SQL Server.

Kind regards

Christophe