Fix unit tests on MsSQL and Oracle