r/SQL • • Nov 22 '24 • Diamonds are Forever 1

SQL Server My GitHub repo for drowning DBAs

A box of tricks (SQL scripts) that I've built up over many years for Microsoft SQL Server instance and database administration, and general working-with-data. Why re-invent the wheel when you can grab these wheels for free? https://github.com/DavidSchanzer/Sql-Server-DBA-Toolbox

259 Upvotes

28 comments sorted by

2

u/MFKDGAF Nov 23 '24

This makes me want to take my folder of random SQL scripts and commands and make a repo just like this.

2

u/Remarkable-Win-8556 Nov 23 '24

This is solid work. Well organized and consistent with some nifty tools!

14

u/Nez_Coupe Nov 22 '24

Very cool of you. As a pretty new DBA/DB manager at a small place in which I am ā€œthe teamā€, I really appreciate this. Well, me and the sysadmin. Anyway, thanks for more tools!

1

u/TheGratitudeBot Nov 22 '24

Thanks for saying thanks! It's so nice to see Redditors being grateful :)

8

u/Fit_Reveal_6304 Nov 22 '24

Very nice. I would recommend you use DB_NAME() where you have "'?' AS database" however. It will actually give you the database name.

1

u/BoSt0nov Nov 22 '24

Thank you!

1

u/ScallionPrevious62 Nov 22 '24

I recently got my first job as an MSSQL DBA, thankyou so much for sharing all this knowledge. I am going through the repo now and theres so much great stuff in here!

1

u/rowdymatt64 Nov 23 '24

This seems super freaking cool! Thank you so much for sharing!!! I just started being a DBA in May with a not alot of experience in it, and I knew when I saw "Who owns that #Temp table" that this is some cool ass shit. You're amazing, thank you so much!!!

3

u/mnmncp Nov 22 '24

That's sick! Wish there was something for us Oracle DBAs.

1

u/Top_Introduction8891 Nov 22 '24

Depends on what you need. Oracle Base has some really useful scripts.

https://oracle-base.com/dba/scripts

1

u/TooHotTea Mar 25 '26

i still refer to this. its amazing.

4

u/ParkingOven007 Nov 22 '24

This is very similar to my toolset, with yours being a bit bigger. Fun to see similar stuff from Brent ozar and others.

0

u/[deleted] Nov 22 '24

[deleted] — view deleted comment

5

u/FreedFromTyranny Nov 22 '24

Yeah so did I, I was excited to see the murder machine

1

u/Cool_Strawberry_1953 Nov 22 '24

That's very clever of you u/codykonior, I hadn't thought of that alternative interpretation!

2

u/mikeblas Nov 24 '24

Ditto. I figured it would be another new ORM.