BAC-861: new version of migration script to monitor number of locked processes.