Test for database connectivity