forked for mssql limits