The Multifunctioning DBA:

Reporting

Jun 25 2009   3:30PM GMT

SQL Server Health Report



Posted by: Colin Smith
SQL Server, MSSQL, Microsoft, Powershell, Monitoring, Reporting

Yesterday I posted about a great article that I found on how to use Powershell to create an excel file and also use SMO to get information about SQL Server. I am working on a report that I will have run daily. This report is going to give me an overall health check of my SQL Servers. I am going to have it report to me if all of my important jobs are set up and running properly, These jobs being things like backups, tranlog backups (if the Database is using the Full Recovery Model), Rebuild indexes, and things like that. it will tell me how big each Database is, where the MDF and LDF files are on the filesystem, How much drive space we have available for those databases on the filesystem, how much space allocated to the DB is Free, and finally, for instances that have mirroring set up it will tell me the state of the mirror.

For the servers that I am working with on this report I feel that this really does give me a good health check of the server. I am sure that as time goes on I will add more and perhaps modify this to output as a web page and then put some nice eye candy on it for things like cache hit ratio and other metrics like that. I will be posting the code for this report when I am complete with it.

Jun 23 2009   7:54PM GMT

Powershell and SQL Server



Posted by: Colin Smith
Powershell, SQL Server, MSSQL, Reporting

Today I wanted to use Powershell to create a report about my SQL Servers. I found a great article about how to do this using Excel at this link. http://www.mssqltips.com/tip.asp?tip=175… the author does a great job here and has a great sample script that you can start with and then modify as you need. I am doing some modifications and adding some information from the filesystem to the report as well. If you want a good quick easy way to get some eyecandy reporting done in Powershell this is a great article. Thanks to Edwin Sarmiento for putting this out there.