why when I modify a procedure does SSMS generate EXEC dbo.sp_executesql @statement = N'

Answered why when I modify a procedure does SSMS generate EXEC dbo.sp_executesql @statement = N'

  • Wednesday, February 13, 2013 4:25 PM
     
     

    Hi,

    I use SSMS all day to  edit stored procedures (sp) in SSMS 2008r2. Now when I right click on a sp in SSMS instead of generating an 'alter procedure' it generates

    dbo.sp_executesql @statement = N'

    and replaces single quotes with double quotes so the sp_executesql can work. I would like to reset SSMS to generate alter procedure statements. What setting do I change?

    thanks,

    old man dba

     

    ALTER procedure [Helix].[HX_Accounts]


    oldmandba

All Replies

  • Wednesday, February 13, 2013 4:45 PM
     
     Answered

    you or someonelse changed the options in ssms.

    To fix it, in SSMS go to tools, options. then sql server object explorer, and scripting.

    in the object scripting options, where it reads 'check for object existence' switch it to false.

    Hope this helps

    Rui

    • Marked As Answer by OldManDBA Wednesday, February 13, 2013 5:32 PM
    •  
  • Wednesday, February 13, 2013 5:33 PM
     
     
    Thanks so much - such a little (sic) change in options could result in such problems.

    oldmandba