Quickest/Easiest way to use Search/Replace through all stored procedures

前端 未结 13 1182
萌比男神i
萌比男神i 2020-12-30 03:05

Actually, this is a 2 part question.

  1. Is it possible to use some sort of functionality to search through every stored procedure for a string and possibly rep

13条回答
  •  醉话见心
    2020-12-30 03:41

    1. Export all SPs to file. Use your favourite text editing tool to search/replace. Update database by executing the script (as long as you do not rename procedures).

    2. If you explicitly define the full database path, you need to manually (see above) update the stored procedures. If you do not include the database name, or use a linked server or similar, no changes are necessary.

提交回复
热议问题