Ping database to ensure connectivity.