Changes extra connection logic in SqlDatabase not to use a ThreadLocal.