DMV's are very useful. In fact, they are like glass windows that lets you look at a running engine. There are lots of them and they give us lots of numbers but Most are cumulative in nature! i.e., the numbers keep on increasing and never decrease. A variation of above like space usage where the … Continue reading SQL Server: Dynamically Calculate Delta Values For Numeric And Date Columns From DMV’s Or Any Table
If you have been working with PowerShell and SQL Server for a while now, you know that it is not difficult to capture the PRINT statement output as VERBOSE output (which can then be redirected to a variable or file). You also know that it is not too difficult to run SQL in parallel against … Continue reading PowerShell & SQL Server: Run In Parallel – Collect SQL Results With PRINT Output From Across Your SQL Farm – Fast!
There are native PowerShell cmdlets to export to CSV or text but I have not seen one that can easily export any SQL query output to a SQL Server table in bulk (Write-DbaDataTable function of dbatools does it for one table which I use in my solution below). I probably did not look too hard … Continue reading PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables