使用 sp_executesql 阻止 SSMS 编写 SP 脚本? [英] Stop SSMS from scripting SPs using sp_executesql?

查看:35
本文介绍了使用 sp_executesql 阻止 SSMS 编写 SP 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 SSMS 编写存储过程脚本时,它会将脚本包装在一个 sp_executesql 语句中,这让我很烦恼.有没有办法阻止 SSMS 这样做并使用直接的 CREATE PROCEDURE...?

When I use SSMS to script a stored procedure, it wraps the script in a sp_executesql statement which bugs me. Is there a way to stop SSMS from doing this and use a straight CREATE PROCEDURE...?

编辑:我的意思是 SSMS 不是 SSIS

EDIT: I meant SSMS not SSIS

推荐答案

关闭Include IF NOT EXISTS"选项.

Turn off the "Include IF NOT EXISTS" option.

它位于工具...选项,然后在弹出的对话框的资源管理器窗格中单击脚本".IF NOT EXISTS"选项位于自上而下的第二组(对象脚本选项).

It's at Tools..Options, then click "Scripting" on the explorer pane of the dialog that pops-up. the "IF NOT EXISTS" option is in the second group from the top (Object Scripting options).

这篇关于使用 sp_executesql 阻止 SSMS 编写 SP 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆