issue #20524: ensure begin first and then run scripts
issue #20524: ensure begin first and then run scripts
issue #20524: need lib/orm too