"Class coursecat_sortable_records is deprecated without replacement"
So we are trying to 'merge' courses from 2 different moodles ... what are the versions of moodle involved? Guessing older moodle version > newer moodle version? or is it the other way round?
Error has been reported before and back then, the advice suggested to fix follows (summation/translated below):
Compare what you have in config.php DB array (especially collation) with the true tables collation ... use scripts in moodlecode/admin/cli/ for mysql ... run them all to verify tables and columns are all the same.