fixed test for mssql server
cache db backend to support mssql
mssql has limit of 2100 parameters
mssql doesnt have length function, using simpler select