select db when connection is ready