Like probably every SQL DBA, consultant, architect etc etc out there that has ever worked on or used SQL Server they will likely have their own personal collection of SQL Server Help Scripts.
So not unsurprisingly I also have such a collection – and this is the purpose of this post!
The below is a link to my GitHub repo of my personal collection of scripts. BTW this isn’t all of the scripts, but is probably 50% of the ones I have lurking around.
These are either scripts I have developed in my own time over the years, or adapted from various other websites which I found handy at the time for whatever reason.
Where I have remembered that web site (like most people, which is unfortunately almost never) it was typically from sites like stack overflow etc, and if so I have tried to cite it as such to provide credits.
Quite a few of my scripts are in fact scripts that generate other scripts!
So in other words – its a script you run on a source SQL Server where the output of that script execution is in fact another script that performs some dynamic operation based on the source server configuration at the time the original script was run.
These are perfect for those times you need to create scripts for some later activity, such as to say backup or restore databases, recreate indexes, change database properties, set login properties, etc etc
The below is the link to the repo and a list of the scripts I have there. Read on!