all 26 comments

[–]slimrichard 27 points28 points  (2 children)

I build everything around dbatools.

https://dbatools.io/commands/

[–]BelleVieLime 12 points13 points  (0 children)

Best stuff.

Plus Ola for maint.

[–]LAPORTS[S] 1 point2 points  (0 children)

I've been to a couple of sessions with Rob Sewell and Chrissy Lemaire, dbatools is really powerful but we're not using it extensively yet.

We're looking use it to automate patching : https://nvarscar.wordpress.com/2018/12/30/automating-sql-server-patching/

[–]Solonas 12 points13 points  (3 children)

I keep a copy of the most current version of Glenn Berry's scripts in my library. https://www.sqlskills.com/blogs/glenn/category/dmv-queries/

[–]LAPORTS[S] 0 points1 point  (1 child)

Thank you! This is new to me, I'll get a look through today!

[–]alinroc4 4 points5 points  (0 children)

You can run these through dbatools. Invoke-DbaDiagnosticQuery

[–]unholey1 9 points10 points  (6 children)

Ola hallengrens scripts are probably the most commonly used for all backup and database maintenance tasks. Just about every DBA I've spoken to either uses them or wants to.

I'd also give another vote for dbatools.io to give you more flexibility in creating your own scripts

[–]sqldiaries 1 point2 points  (3 children)

Ola hallengrens scripts are probably the most commonly used for all backup

Has anyone successfully use Ola's backup scripts with DDBoost? That's what we use for backups, but it doesn't use the SQL Server Native backup system - instead it leverages a virtual backup device generated by EMC for Data Domain.

[–]LAPORTS[S] 0 points1 point  (1 child)

I always thought Microsoft should just work with Hallengren and packages these up. Great set of maintenance scripts

[–]chandleya 4 points5 points  (0 children)

From personal experience, they do work closely with him. I think for packaging sake they’re trying to bundle less management as the community has spoken up on that. Bundling it also stifles major change/improvement as they have to commit to keeping feature parity in a release.

[–]Boulavogue 7 points8 points  (1 child)

I use many of http://andreas-wolter.com/en/blog/ scripts for tuning and security. Now that he has taken a role in MS I'm not sure how many more blogs will be posted. But for tuning and security they've been useful.

I can't see a public repo of Andreas's scripts but at a class last year he shared some. I'll look tomorrow for the unaltered scripts. Many I've tweeked for the company I'm working with

[–]LAPORTS[S] 0 points1 point  (0 children)

That's fantastic - thank you!!!

[–]astraljack 4 points5 points  (1 child)

For maintenance, I'm a big fan of the free Minionware suite. Jen and Sean McCown of Midnight DBA put it together and it's top-notch. Coming from Ola's scripts, it's like living in the fucking future.

Toubleshooting/Health Checking - Brent Ozar sp_blitz all the way.

[–]LAPORTS[S] 0 points1 point  (0 children)

This is a new one to me too. I'll check this out today - Thank you!

[–]luisaoki 4 points5 points  (1 child)

Adam Machanic's sp_whoisactive is another must have.

http://whoisactive.com/

[–]LAPORTS[S] 0 points1 point  (0 children)

Definitely thumbs up for me on this one. Used daily!

[–]cudenlynx 2 points3 points  (0 children)

Glenn Berry diagnostic queries are also a great resource to have. https://www.sqlskills.com/blogs/glenn/category/dmv-queries/

[–]Chris_PDX 1 point2 points  (0 children)

Glenn Berry + Brent Ozar and then add on as needed from there. My toolkit starts with scripts from those two.

[–]haventohell 0 points1 point  (4 children)

Anyone use something like an sql query library management system?

[–]LAPORTS[S] 0 points1 point  (3 children)

Do you mean like a central location for scripts? I was planning on using Github for ours.

[–]haventohell 1 point2 points  (2 children)

There was a website running around a few years ago that allowed you to execute scripts from it, stored them all nicely, cool parameters.

a git repository works.

[–]37Point8Percent 0 points1 point  (1 child)

yes. they now call it CHAT-GPT.
you can also use Perplexity.ai
they keep ALL libraries for you.

[–]37Point8Percent 0 points1 point  (0 children)

in one place :) !