A ping will only check if the VM (i.e., machine) is up, but not the database application.
You can write an adapter service that performs a “select * from DUAL” query for Oracle, or any other simple equivalent query in other databases. Wrap this in a flow service that follows the Resource Monitoring principles/specification, et voila, you are done.
Resource Monitoring requirements are documented in the Publish Subscribe Developers Guide (link).
KM
#Integration-Server-and-ESB#webMethods-io-Integration#webMethods