none
"Generate Scripts" in SSMS 2008 doesn't script indexes and triggers by default

    Question

  • I noticed that "Generate Scripts" in SSMS 2008 doesn't script indexes and triggers by default. I know this can be changed in SSMS options but why would anyone want to omit these 2 important parts (especially triggers) when scripting database? What is the logic behind this implementation?
    Friday, August 19, 2011 7:04 PM

Answers

  • Hi

     Per SQL Server BOL http://msdn.microsoft.com/en-us/library/ms186472.aspx

    They both should be true by default but I can't find in my SSMS that way.

    You can set both of those options true permanently

    under SSMS-->Tools-->Options -->SQL Server Object Explorer-->Scripting-->Change Script Trigger to True

    after this whnever you run Generate Script wizard will have Script Triggers set to True.

    Same applies to Script Indexes.

      




    • Marked as answer by Peja Tao Thursday, August 25, 2011 8:43 AM
    Friday, August 19, 2011 7:17 PM
  • Hi,

    You could also submit a feedback of this issue to the Microsoft Connect at this link. This connect site will serve as a connecting point between you and Microsoft, and ultimately the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft Connect.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Peja Tao Thursday, August 25, 2011 8:43 AM
    Tuesday, August 23, 2011 2:00 AM

All replies

  • Hi

     Per SQL Server BOL http://msdn.microsoft.com/en-us/library/ms186472.aspx

    They both should be true by default but I can't find in my SSMS that way.

    You can set both of those options true permanently

    under SSMS-->Tools-->Options -->SQL Server Object Explorer-->Scripting-->Change Script Trigger to True

    after this whnever you run Generate Script wizard will have Script Triggers set to True.

    Same applies to Script Indexes.

      




    • Marked as answer by Peja Tao Thursday, August 25, 2011 8:43 AM
    Friday, August 19, 2011 7:17 PM
  • Hi,

    You could also submit a feedback of this issue to the Microsoft Connect at this link. This connect site will serve as a connecting point between you and Microsoft, and ultimately the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft Connect.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Peja Tao Thursday, August 25, 2011 8:43 AM
    Tuesday, August 23, 2011 2:00 AM