Test for database connection.