I'm creating a new staging database, into which I intend to migrate several tables from the old database. These tables are referenced in functions and stored procedures. If I were doing things manually, I would just migrate the tables, and then modify the functions by replacing the old table name with the new table name. I'm thinking there must be a more automated way of doing this though.
Has anyone done something similar; what tools have you used to help refactor?