August 10, 2016 at 12:30 am
Hi all,
I am new to DBA.
I need a sql server powershell scripts to take the health check and mail through the database mail.
Disk space and last backup status.
CPU Utilization.
RAM Utilization
Blocking details
Deadlock details
SQL Server Wait types
Top Queries
a. By CPU
b. By Duration
c. By I/O
Index information
a. Index fragmentation
b. Missing indexes
c. Un-used indexes
Database growth history..
Please help on this
August 10, 2016 at 10:53 am
If you google: sql server health check script with powershell
That will give you quite a few examples of different Posh scripts to get you started.
Sue
August 11, 2016 at 12:25 pm
Thank you for the reply. It is showing many scripts , but it is showing errors. Since i am new to powershell, i can't resolve it.
If you have any working scripts related to this. Please share it ASAP.
Thanks
NM
August 11, 2016 at 12:41 pm
naren.ece2012 (8/11/2016)
Thank you for the reply. It is showing many scripts , but it is showing errors. Since i am new to powershell, i can't resolve it.If you have any working scripts related to this. Please share it ASAP.
It's probably of very little value to you if you can't enhance the script, can't troubleshoot it, etc. No one will have a script that has everything exactly how you want for this using the exact environment you have and executing how ever you execute it.
Powershell is a great tool to learn and using it for monitoring is a great idea. What you really want to do is find the script closest to what you are looking for and then start learning powershell by getting it to work in your environment.
To get started in powershell, you can start by reading the stairways series here:
http://www.sqlservercentral.com/stairway/91327/
You'd really want to go through that to at least get things setup and configured to be able to run powershell scripts and understand the environment a bit.
And then when you get comfortable with some of the basics, there is a Powershell forum here as well if/when you get stuck along the way to post powershell questions:
http://www.sqlservercentral.com/stairway/91327/
Hope that helps -
Sue
August 11, 2016 at 12:43 pm
Duh...sorry about that. Pasted the same link to the stairway article instead of the forum.
This is the Posh forum:
http://www.sqlservercentral.com/Forums/Forum1351-1.aspx
Sue
August 11, 2016 at 5:55 pm
You don't need Powershell for this. Google for Brent Ozar's "sp_Blitz" and Adam Machanic's "sp_WhoIsActive".
Just remember... if you can't write it, you might not be able to maintain it.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply