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
If the SQL Server databases being manged are a few GB in size each, then having a single .mdf file for data is fine. However, if the size is anywhere in the hundreds of GB or more, then a single .mdf file is certainly not the way to go. Related to this, please checkout my … Continue reading SQL Server – Breakup A Monolithic Data File (Database) Into Multiple Small Files And Breakaway From Shrinking!
Last week, I wrote a post on how to relocate Oracle data files from one drive to another. Today, let us see how simple it is to do the same in SQL Server. I am running SQL 2014 but it should not be too different Say "No" to huge single .mdf file databases! Space got … Continue reading SQL Server – Move Data Files To Another Drive