Skip to main content
1-Visitor
Jun 20, 2017 9:55 PM UTC
Question

How does Thingworx store data in H2 database?

I just try to view some data out of my Thingworx instance through the H2 Console. Does anyone know in which table I can find something?

6 replies

12-Amethyst
Jun 21, 2017 11:18 AM UTC

Hi, I also like crawling the database tables, but ThingWorx has so many great API functionality, that ir realyl makes no sense to directly crawl the DB. Additionally it is also not really recommended to do, because for example deleted data get only flagged and afaik deleted afterward in a cleanup job. API is aware and will give you always the right answers. Crawling DB must have this deep inside to understand really every aspect.

Translate
1-Visitor
Jun 21, 2017 12:05 PM UTC

Thanks for your quick response. I just wanted to show it for a small Demonstration. Which API functionality do you mean exactly? For example REST calls to delete data?

Translate
1-Visitor
Nov 13, 2017 3:28 AM UTC

Do u find the thingworx data in H2 database? I also have the same problem.

Translate
5-Regular Member
Nov 13, 2017 10:49 AM UTC

Hi Li, could you please elaborate on your use case? Is there specific reason why you need to directly access H2 data?

Translate
17-Peridot
May 17, 2018 5:00 PM UTC

I finally found the solution:

Instead of connecting to the directory

jdbc:h2:E:\ThingworxStorage\database

you need to connect to the database name. The name of the db file is data.h2.db So you need to connect to

jdbc:h2:E:\ThingworxStorage\database\data

and you will see all the tables (your absolute path will differ):

2018-05-17 18_59_34-H2 Console.png

 

Now you can query all the tables!

 

Regards,

Nico

Translate
1-Visitor
Dec 20, 2018 2:31 PM UTC

And leave the user and password blank

Translate