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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How does Thingworx store data in H2 database?

msiemering
1-Newbie

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 6

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.

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?

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

supandey
19-Tanzanite
(To:lshihao)

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

nmutter
14-Alexandrite
(To:msiemering)

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

And leave the user and password blank

Top Tags