Skip to main content
Sep 15, 2022 10:11 AM UTC
Solved

How to ping Database server using javascript code in thingworx service ?

How to ping Database server using javascript code in thingworx service ?

danmorinAnswer
Sep 20, 2022 9:19 AM UTC

Okay got it, so in that case here is my 2 possible idea

 

1. Use other apps to communicate with cmd to ping the destination server, for example using node-red and ThingWorx can communicate with Node-RED via REST Call or other programming language would also works, I find it easier just using node-red. The apps can be deployed on the same server as ThingWorx

 

2. Validate after creating the Things

 

Thanks

4 replies

Sep 20, 2022 5:54 AM UTC

HI @UY_9515947 

 

Usually, we ping it from the server that hosts ThingWorx. Can't you access the server?

 

Thanks

Sep 20, 2022 6:16 AM UTC

I can access both ThingWorx hosting and Database server.

 

Let me explain the case :

we are creating multiple MSSQL Things with JDBC Settings Parmeters as inputs.

so, wanted to Validate JDBC Settings Parmeters before creating the Things by pinging the database.

 

 

 

 

danmorinAnswer
Sep 20, 2022 9:19 AM UTC

Okay got it, so in that case here is my 2 possible idea

 

1. Use other apps to communicate with cmd to ping the destination server, for example using node-red and ThingWorx can communicate with Node-RED via REST Call or other programming language would also works, I find it easier just using node-red. The apps can be deployed on the same server as ThingWorx

 

2. Validate after creating the Things

 

Thanks

Sep 24, 2022 7:24 PM UTC

HI @UY_9515947,

Create a Thing with DataBase ThingTemplate, go to the Configuration Tab, and do the following configuration for MSSQL.

Shashi_Preetham_0-1664047414879.png
Thanks,