added oracle- and sqlserver-specific code for limiting test query
output.