SQL Server System Report

  • The only issue with doing that is that if someone does not have cmd shell enabled the code will fail. I will leave it to the individual if they wish to use / replace that code.

    As for saving the data to a table, the output is not really "logging" friendly. I will likely add this as an option in future updates, but there's some major code changes that I need to add to make it functional.

  • sure, that sounds good.

  • Sean,

    attached is an old script I came up with a few years back (I'm sure somebody else thought of this before me).

    It checks what the existing advanced options and xp_cmdshell settings are, changes them if it needs to, then changes them back to what they were.

    Anyway, it could be incorporated around your existing code if you wanted.

  • Thanks! I actually have something like this. The only issue is that depending on someone's environment, it could violate their security policies. Unfortunately I can't be the one to decide this for everyone who may download this script and implement it. But, with everything everyone has posted here it at least gives them the option to manually modify the script to their needs and use any options they wish. Thanks for sharing, it's really appreciated! 🙂

  • Sean,

    Thanks for a great article! I, too, made a tweak that might be useful to others? I created a parameter "flag" that I can pass to skip the check for unused indexes so that portion of the report can be skipped on our dev servers since they aren't always as active as our prod servers.

  • Very nice! I usually just increase the number of days since the uptime or remove the section completely depending on the server the script is on but I like this idea better. If you wish to post the revised script please do. 🙂

  • Very nice script. Thanks for sharing. As many people have said here, it has a good basis and great potential to be extended to suit people's own needs.

  • Thank you. I am glad people find it handy and are able to adapt it to their needs. 🙂

  • Sean,

    Excellent script! I find it very useful. Thanks for taking the time and effort to create it and share it. I have found the easiest way to NOT include the Unused Indexes section is simply to pass 9999 to the @vUnused_Index_Days input parameter. Thanks again.

    Lee

  • Thanks Lee, I didn't even think about that! Now I dont have to modify my version when Sean posts a new update. 😉

  • Excellent idea! Thanks for sharing. I'm glad you find it helpful. I can't tell you how many times I've used this script on a new server (well, new to me) and instantly discovered issues (or low hanging fruit, depending on how you look at it). 🙂 I will post when the new changes have been added. I have them prepped to go just need to actually sit down and do it. :p Thanks again everyone for the great feedback and participation. 🙂

  • The XML output version of this script is so crisp and clean, I love it!

    What would make this output more useful to me is if there was a way to accumulate the database size date over time. Once the script is edited so the output can be saved as an attachment that will be great. I did start copying and pasting the data into an excel sheet, but that grew wearisome. So I tweaked the script to output the data into some tables. Now I have a history!

    Again, awesome script, Thanks! 😎

  • Yeah, I really like getting the HTML version in my inbox. It makes me look important and like I'm getting something super-techy. 😉 Every time someone new sees it they're like "Oh, what's that?!" 🙂

    I really need to add history logging so I can create a baseline and run some trending stats (would also help for capacity planning). So many ideas... LOL

  • I added in the ability to show errors/failures in the SQL Error Log for the last 24 hours if anyone is interested.

  • Great idea. Thanks!

Viewing 15 posts - 91 through 105 (of 189 total)

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