Oracle related fixes for migrate specimen events SQLs