Save ALL plans in 1 operation

  • I have some very complex reports that generate like 25 plans.

    I can't find the darn button that saves all 25 plans into a single .sqlplan file.

    What am I missing?

    Sql 2005 standard SP3-ish.

  • Right click the graphical plan, select "Save Execution Plan As..."

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (6/3/2011)


    Right click the graphical plan, select "Save Execution Plan As..."

    Doesn't work. It always and only saves the plan for the query in which I did the right-click.

    Same thing if I use the file menu.

    Any setting I'm missing somewhere?

  • It's weird. If I use SSMS 2008 R2 for the exact smae query it saves both plans. The weird part is that use SSMS 2005 it opens the file and displays both plans.

    But if I start from 2005 it only saves 1 plan, no matter what i do.

    Google hasn't been of much help...

  • I'll try it out on my 2005 vm tonight. However, I've never had problems saving - it's always saved all plans.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • i would swear at one of the SQL Pass sessions, they mentioned that the SSMS 2005 GUI would not save multiple plans, and that they fixed in in 2008 and above...so it was a GUI handicap they addressed.

    obviously the 2005 GUI can open a saved paln that featured multiple plans, right?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (6/3/2011)


    i would swear at one of the SQL Pass sessions, they mentioned that the SSMS 2005 GUI would not save multiple plans, and that they fixed in in 2008 and above...so it was a GUI handicap they addressed.

    obviously the 2005 GUI can open a saved paln that featured multiple plans, right?

    Ya 2005 can open file with multiple plans but apparently not save them... major PITA for me atm.

  • Does this work?

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (6/3/2011)


    Does this work?

    Bingo!

    Thanks a mil.

  • Ninja's_RGR'us (6/3/2011)


    WayneS (6/3/2011)


    Does this work?

    Bingo!

    Thanks a mil.

    NP.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply