Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Level I

Check status/availability of a database server

Is there an easy way to check that a database server is available, and if not move on to the rest of a script? I have a dashboard script that pulls data from two separate tools with their own local databases. One of the tools is down for maintenance, thus shutting its computer down as well. When the script runs now, it looks for that server and when it does not find it, the script just stops without moving on to the next tool. 


I am open for suggestions.


Re: Check status/availability of a database server

I would use the Create Database Connection() function. It should return a reference to an object that you use for subsequent database actions. If it fails, then it either returns empty or generates an error. (I'm not sure which outcome.) You can check for the first possibility with the inquiry function Is Empty(). You can check for the second condition with the Try() function.

Learn it once, use it forever!
Article Labels

    There are no labels assigned to this post.