replacing a string in all sps

  • I need to change a database table name and hence rename all the references to it in stored procedures. Does anyone have a script that does this or knows where I can find one?

    thanks,

    suada

  • You can change the database name with the stored proc in master sp_Renamedb

    or Use the ALTER database statement....

    As for the procs, I script them all out in a single file, and any text editor will replace the names (ultraedit being my preference, but word, notepad, wordpad, etc...)

    and then run them back in.....query analyzer

    If your not gonna help, Please move to the side, because if your not helping the situation, your hurting it....

  • I was expecting a complex script that scans sys objects table - instead this was really simple and worked great! Cheers!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply