Ported SQLServer support from redbean 3.5