Perform batch replacement through vim and generate a script indicating the changes, for example:
aaa_table1 -> alter table aaa_table1 rename bbb_table1
aaa_table2 -> alter table aaa_table2 rename bbb_table2
aaa_table3 -> alter table aaa_table3 rename bbb_table3
.....
Using group ("(...)") in vim to implement.
:%s/aaa_(.*)/alter table aaa_1 rename bbb_1/g