• I noticed that you are using SQL 2005, so SSIS (SQL Server Integration Services) will be the best choice here, but if you wish to continue with same logic then I recommend the following changes.

    > Create a new stored procedure by name ScriptGenerator, let it loop through district-tables (alias information) and form all the Insert and Update statements. And let it alter the actual stored procedure created by you and feed all the newly created Insert and Update statements. By this way you will gain a huge performance benefit.

    So rather than calling

    exec 'insert into xyz values (1,2,3)'

    you will find a direct executable statement in your SP

    insert into xyz values(1,2,3)

    > You might have already taken this into condieration, but try to remove any indexes if possible from the new storage place, having indexes takes more time for insert and update.