check if database is ready