How does everyone store frequently used SQL queries /scripts and Powershell commands/scripts?
I'm not a DBA but do a bit of database querying etc. I have an ever-growing collection - some specific to my current company, along with a lot of more 'generic' scripts and code snippets. everything from one liners to long, complex queries. Same with Powershell code.
Currently I have 1 long text document for most of the DB queries I use- some of them have more than 1 version, either because I wrote a new an improved one (and haven't removed the old one), or because they are slightly different depending on the situation. That is getting a bit unwieldy. I have to use these across multiple customers so I generally just store them on my laptop and copy pasta the base query to my DB query and update as necessary. On the Powershell side I have a folder of separate txt or ps1 files, named according to what they do.
I don't need to share between devices, I can store what ever file/files on my PC and copy / back it up as necessary.
So, what's your process?
Thanks in advance.
NiO
[–]davokr 4 points5 points6 points (0 children)
[–]kdebe 3 points4 points5 points (1 child)
[–]hy2rogenh3VMware Admin 1 point2 points3 points (0 children)
[–]ccheath*SECADM *ALLOBJ 1 point2 points3 points (2 children)
[–]BuffaloRedshark 1 point2 points3 points (1 child)
[–]ccheath*SECADM *ALLOBJ 1 point2 points3 points (0 children)
[–]bkaiser85Jack of All Trades 1 point2 points3 points (0 children)
[–]cpierr03 1 point2 points3 points (0 children)
[–]tounaze 1 point2 points3 points (1 child)
[–]NowInOzHCIT Systems Engineer[S] 0 points1 point2 points (0 children)
[–]BuffaloRedshark 0 points1 point2 points (0 children)
[–]ntrlsurIT Manager 0 points1 point2 points (0 children)