Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automating SQL Server Health Check (SQL Server 2005)


Automating SQL Server Health Check (SQL Server 2005)

Author
Message
Ritesh Medhe
Ritesh Medhe
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 234
Comments posted to this topic are about the item <A HREF="/articles/Automating+SQL+Server+Health+Checks/68910/">Automating SQL Server Health Check (SQL Server 2005) </A>

!!!!!!!!!!!!!!!! Please try this modified script. This version contains fix to all the issues reported by people.

Vote Of Thanks!!!!!!!

Thanks for all the posts. I really appretiate and I hope that this article will be helpful for DBAs and make their life little easy.

Special thanks (For making my solution perfect and fixing the bugs Smile)
@Mark-1022992:
For pointing out

exec EmailSQLServerHealth '10.10.10.10', 'MYProject', 'myself@mycompany.com', 'TestMailProfile'

exec uspEmailSQLServerHealth '10.10.10.10', 'MYProject', 'myself@mycompany.com', 'TestMailProfile'

@SRosewarne-795472: For recommending table vairable.

@nplace6530: For fixing
An INSERT EXEC statement cannot be nested

@david.beechum: reducing the backup stats range from 1 month to one day this has certainly improved the performance.

@timothy.shawley: For fixing the HTML tags issue.

Thanks a lot guys.......
Attachments
modifiedscript.txt (643 views, 19.00 KB)
Omprakash K Deshpande
Omprakash K Deshpande
SSC-Addicted
SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)

Group: General Forum Members
Points: 438 Visits: 158
Hi Ritesh,


I also implemented these automation on our servers. I think you missed few more things like when new db created, dropped and altered on the server, reading sql server error log, login creation and dropped. Depending on our requirement we can automate few more tasks. Its a good example for other DBA to take a look and make there routine work easy. In this method a single DBA can maintain multiple servers and database simultaneously and also increases DBA productivity.

Thanks
Omprakash
fk_okumu
fk_okumu
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 2
Hi
I am a novice DBA but I was thrilled to read your article and found it very helpful. This gives me an opportunity to automate my SQL health checklist, I wonder if it is possible to create a realtime dashboard to monitor database and server performance related issues?
dallas-1069889
dallas-1069889
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 139
I dislike that the article contains this.

"use any HTML editor like Microsoft FrontPage, which is the nice and easy to use application"

That looses a lot of credibility, especially since creating html is not the focal point of the task.

The article itself provides good information on a subject that's very important for the (often unintentional) DBA; that is keeping an eye on things. It could do with an update to ss2008.
Ritesh Medhe
Ritesh Medhe
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 234
thanks OM. I totally agree with you the items you mentioned are core DBA activities. This article just features basic items which need to be monitored on any DB server. This is good to start with for people who have no monitoring in place.
Ritesh Medhe
Ritesh Medhe
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 234
there are lots of third party tools...
Ralf.Hoffmann
Ralf.Hoffmann
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 35
Hello,

thanks for the promising looking script! But at least for me this script is not working and fails with error..even I have just copy&paste the the script ..Did I something wrong?

Errors I've got:
Msg 137, Level 15, State 1, Procedure uspEmailSQLServerHealth, Line 146
Must declare the scalar variable "@OriServer".
Msg 137, Level 15, State 1, Procedure uspEmailSQLServerHealth, Line 147
Must declare the scalar variable "@strSubject".
Msg 137, Level 15, State 2, Procedure uspEmailSQLServerHealth, Line 167
Must declare the scalar variable "@OriServer".
Msg 137, Level 15, State 2, Procedure uspEmailSQLServerHealth, Line 228
Must declare the scalar variable "@OriServer".
Msg 102, Level 15, State 1, Procedure uspEmailSQLServerHealth, Line 261
Incorrect syntax near 'X'.
Msg 137, Level 15, State 2, Procedure uspEmailSQLServerHealth, Line 382
Must declare the scalar variable "@startdate".
Msg 137, Level 15, State 2, Procedure uspEmailSQLServerHealth, Line 430
Must declare the scalar variable "@owner".
Msg 137, Level 15, State 2, Procedure uspEmailSQLServerHealth, Line 440
Must declare the scalar variable "@strSubject".

Thanks in advance!
Ritesh Medhe
Ritesh Medhe
Old Hand
Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)Old Hand (327 reputation)

Group: General Forum Members
Points: 327 Visits: 234
hey ralf. dont do copy paste. open the .sql file in SSMS and then run it will work...
Omprakash K Deshpande
Omprakash K Deshpande
SSC-Addicted
SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)SSC-Addicted (438 reputation)

Group: General Forum Members
Points: 438 Visits: 158
Download the attached file and then execute. I think while copying you missed some code. For me it worked properly.
arr.nagaraj
arr.nagaraj
SSChasing Mays
SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)SSChasing Mays (632 reputation)

Group: General Forum Members
Points: 632 Visits: 1590
Any idea on how to capture CPU % used by sql server?.
I mean CPU % shown in task manager or process - Processor%time-> perfmon counter and not the CPU cycles shown by sysprocess or @@cpu_busy ( cpu ticks )

Regards,
Raj

http://Strictlysql.blogspot.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search