Skip to main content
1-Visitor
July 10, 2025
Solved

Ability to Search the Services of a Database Thing for a specific string value

  • July 10, 2025
  • 2 replies
  • 338 views

We are using ThingWorx Platform 9.6.  Is there a way to search the services attached to a database thing?  For example, I want to know each service that contains a SQL Server Table named Customers?  Is there a way to search the SQL queries within each service and return a list of all services that contain this table? 

Best answer by Rocko

You can run Resources["EntityServices"].ReadEntityAsJSON() and then browse the result, it's probably somewhere under effectiveShape.serviceImplementations.<SERVICENAME>.configurationTables.Query.rows[0],sql

You will have to iterate over all services and filter for the ones with handlerName="SQLQuery".

2 replies

Rocko
Rocko19-TanzaniteAnswer
19-Tanzanite
July 11, 2025

You can run Resources["EntityServices"].ReadEntityAsJSON() and then browse the result, it's probably somewhere under effectiveShape.serviceImplementations.<SERVICENAME>.configurationTables.Query.rows[0],sql

You will have to iterate over all services and filter for the ones with handlerName="SQLQuery".

12-Amethyst
July 15, 2025

Hi @SB_12787070

It appears that this post may answers your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,
Abhi