Improves detection of correct SQL database in Metric objects.