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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How does Thingworx store data in H2 database?

msiemering
2-Explorer

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?

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

Duartefe
12-Amethyst
(To:nmutter)

And leave the user and password blank

Announcements


Top Tags