Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

The Best Database Administrators Automate Everything Expand / Collapse
Author
Message
Posted Thursday, April 5, 2012 10:19 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, August 23, 2014 6:03 AM
Points: 351, Visits: 1,556
Comments posted to this topic are about the item The Best Database Administrators Automate Everything


John Sansom (@sqlBrit) | www.johnsansom.com
Post #1279311
Posted Friday, April 6, 2012 1:04 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 10:07 PM
Points: 49, Visits: 849
Hi,

very nice article.

There's a chapter on the same topic (called the Self-healing database) in the book SQL Server DMVs in Action http://www.amazon.com/SQL-Server-DMVs-Action-Management/dp/1935182730/.

It contains SQL code for automatically: recompiling slow routines, rebuilding/reorganizing indexes, intelligently updating statistics, implementing missing indexes, and much more.

Chapters 1 and 3 are available for free at http://www.manning.com/stirk/

Enjoy
Ian

Post #1279328
Posted Friday, April 6, 2012 1:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 18, 2014 10:23 AM
Points: 4, Visits: 57
agree... but I still have not reached the holy grail of automating the patching, database failovers, reboots and failbacks of SQL servers in a 24x7 online environment. Has anyone?
Post #1279338
Posted Friday, April 6, 2012 5:10 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 7:40 PM
Points: 3,062, Visits: 2,673
I got to the point where I was constantly fighting fires and never really getting anything "useful" done. So, I decided that I would stop fighting the fires. Instead, I decided that they would eventually burn themselves out whilst I was getting on with getting things in good shape (i.e. fixing the underlying causes of those fires). To my surprise, the decision did not cause as big a problem as you would think. As I fixed the causes, my life got easier and easier. It became easier to do everything I needed to do (in the end, I was the only SQL DBA, managing 40 SQL Server installation (all quite similar installations) and about 10 other SQL Server installations that were unique).

So, get the right level of automation in place and you really can do some amazing things (and go home at a reasonable time of day, every day)



Post #1279409
Posted Friday, April 6, 2012 6:09 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, August 23, 2014 6:03 AM
Points: 351, Visits: 1,556
SQL-Expat, PowerShell can certainly help you with some of these tasks.


John Sansom (@sqlBrit) | www.johnsansom.com
Post #1279439
Posted Friday, April 6, 2012 6:12 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, August 23, 2014 6:03 AM
Points: 351, Visits: 1,556
happycat59, Well said sir!

You're not ignoring the problem by working towards actually fixing it for good. It's called paying down Technical Debt.

Thanks for sharing your story.



John Sansom (@sqlBrit) | www.johnsansom.com
Post #1279444
Posted Friday, April 6, 2012 7:06 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, November 20, 2014 5:50 AM
Points: 177, Visits: 569
John.Sansom (4/6/2012)
SQL-Expat, PowerShell can certainly help you with some of these tasks.


Agreed, I only picked up PowerShell a few months back, but it has been a life saver.

It has allowed me to:

- Populate a central repository of completed backups from all remote servers to watch for failures using SSRS.
- Script a remote start up and shut down of all SAP services on SQL clusters for monthly patching.
- Script the remote startup and shutdown of SQL services and bouncing of servers.
- Push SQL Alerts to all SQL servers to create some standards across our global infrastructure.

If you haven't used it yet, I would begin reading. Very easy to pick up.
Post #1279470
Posted Friday, April 6, 2012 7:40 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 27, 2012 9:09 PM
Points: 136, Visits: 383
Still on the topic of automating maintenance tasks.. consider the following monthly security patch maintenance steps on 100+ SQL Servers with 500+ databases:

1. install monthly security patches on all mirror servers (automated tool)
2. monitor mirror servers for any security patch related issues... (semi manual)
3. reboot all mirror servers (automated/scripted)
4. confirm successfull reboot and QA mirror servers (semi automated...)
5. failover all principals to mirrors (automated/scripted)
6. monitor mirrors (new principals) for any security patch related issue (semi automated...but requires manual checks)
7. ensure applications have redirected to mirrors
8. patch and reboot principals
9. confirm successfull reboot and QA principal servers
10. failback all databases to principals
11. QA - replication, mirroring, log shipping, application connections etc, etc

Now, most of the individual steps are scripted/automated. The tough part is having a master script or control that coordinates it all - something that poll all servers and only continue the sequence when required.. Curious if anyone has reached full automation on the above...

In some cases servers require 2/3 reboots.
Sometimes servers are in pending reboot state so require additional reboot before patching.
Some servers can take 30+ minutes to reboot...
Also, there's the suppressing of monitoring alerts during the maintenance too for things like Replication errors, log shipping latency, mirroring alerts etc.



thanks

SQL_EXPAT
Post #1279489
Posted Friday, April 6, 2012 8:05 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, January 15, 2014 1:40 PM
Points: 93, Visits: 120
Thanks for posting this article, it describes my main drive in my work.
In the past I used vbscript a lot, but became a convert of powershell and have never looked back since. I have noticed that I use SSIS a lot less since my powershell conversion
Powershell has even displaced my favorite scripting language, the mighty Python (may it live forever).
Post #1279498
Posted Friday, April 6, 2012 8:13 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, August 23, 2014 6:03 AM
Points: 351, Visits: 1,556
artilugio, my pleasure sir, I'm glad you enjoyed it.

Wait, do people even still use Python?



John Sansom (@sqlBrit) | www.johnsansom.com
Post #1279505
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse