SSMS 'Generate Script' option RRS feed

  • Question

  • Hi,

    I have been using SSMS for years w/no issues. Recently I started using SSMS2012.  I found that the default rows returned by simple queries where you right-click on a table to be lacking as far as quantity goes.  So, I went into the Tools->Options->SQL Server Object Explorer->Commands and upped my default row counts to 2000 from 200.

    But, I found immediately after that when I now right-click on a Stored Procedure (SP) and click Modify, whereas it used to bring up the SP in it's native form ie: ALTER PROCEDURE PROC1, it now brings it up in it's scripted form. So, instead of being in it's native form, it brings the entire procedure up enclosed in quotes in this form:

    EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE PROC1.......' END

    This is the format if I had requested the SP in scripted form and not in it's native form as it is actually stored in and I used to see when I right-clicked on the SP->modify.

    Any clue as to which setting controls this.

    Thanks in Advance,

    Jim T

    Wednesday, August 9, 2017 12:20 PM

All replies

  • It's the setting Check for Object Existance you should set to False.

    Wednesday, August 9, 2017 9:30 PM
  • I don't think it is related to default row counts option.

    Generally, it depends on your setting for "Object scripting options" under Tools->Options->SQL Server Object Explorer-> Scripting -> "Check for object existence" option.

    If it is "True" then will quote as follows,

    EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE PROC1.......' END

    If it is "False" then will quote as follows,


    Thursday, August 10, 2017 1:07 AM