test database connection