How to Stop SSMS 2012 from scripting SPs using sp_executesql

前端 未结 4 2074
灰色年华
灰色年华 2021-02-18 15:34

I realise this is a very similar question to Stop SSMS from scripting SPs using sp_executesql?

However, they seem to have changed the behaviour with SSMS 2012.

I

4条回答
  •  轮回少年
    2021-02-18 16:31

    I found a good solution to this problem. You must make "two passes" when scripting. During the first pass, select the options to Check for Existence AND for only the DROP script. Then, on the second pass, de-select the option for Check for Existence and select the CREATE script. In addition, use the option Append To File. Then when running the generate scripts on the second pass, uncheck the option for "Overwrite File". This will only work if you are generating a separate file for each object.

提交回复
热议问题