Skip to main content
1-Visitor
September 15, 2022
Solved

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

  • September 15, 2022
  • 2 replies
  • 1794 views

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

Best answer by danmorin

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

2 replies

1-Visitor
September 20, 2022

HI @UY_9515947 

 

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

 

Thanks

1-Visitor
September 20, 2022

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.

 

 

 

 

danmorin1-VisitorAnswer
1-Visitor
September 20, 2022

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

18-Opal
September 24, 2022

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,