dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

Install-DbaDarlingData - Missing Procedures and old domain in documentation #9297

Closed erikdarlingdata closed 2 months ago

erikdarlingdata commented 3 months ago

Summarize Functionality

Not all of my current roster of troubleshooting procedures are included in the install command:

$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_HumanEvents.sql" -Recurse
$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_PressureDetector.sql" -Recurse
$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_QuickieStore.sql" -Recurse

To have the list be complete, you would need to add these:

$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_HumanEventsBlockViewer.sql" -Recurse
$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_LogHunter.sql" -Recurse
$sqlScripts += Get-ChildItem $localCachedCopy -Filter "sp_HealthParser.sql" -Recurse

Alternately, you could just reference DarlingData.sql, which is a .sql file that is built on commit to the main branch, which has all of those procedures included in it, with the most current version.

As a side note, the documentation still lists https://www.erikdarlingdata.com as the domain. I migrated to erikdarling.com last year. There's forwarding set up, so it's not a big deal, but if anyone is feeling generous, it's a small change.

Thanks!

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

No response

andreasjordan commented 3 months ago

Thanks for the issue, I will take care of that today.

Looking at the code, I found a bug: $Procedure is never used, so we always install all procedures. I don't what to remove the parameter, so I will change the code to be able to install every procedure seperatly.

erikdarlingdata commented 3 months ago

Cool, thanks. Perhaps a useful parameter input would be All, which would reference the DarlingData.sql file?

andreasjordan commented 3 months ago

Exactly.

andreasjordan commented 3 months ago

But using DarlingData.sql has a drawback: With a list of individual procedures (and files), we output "Installed/Updated" per file and also check that we have SQL Server 2016 or higher for sp_QuickieStore. With DarlingData.sql we always output "Installed".

So: Should All use DarlingData.sql or just run all the individual scripts?

Will open a pull request with using DarlingData.sql as I've just coded and tested that. But I can change that later...

erikdarlingdata commented 3 months ago

@andreasjordan whatever is easiest for you, really! I want to respect your time and volunteer effort, here.