SQL Server: SSMS – Hung Symptoms – Mouse-clicks Don’t Register Due To Hidden Modal Window Behind SSMS

I am not sure if run into this but I do often enough on my SSMS 17.9.1 version - suddenly, the SSMS window will not register any mouse-clicks although it will seemingly look fine. The reason is because there is a Modal Window¬†somewhere hidden. Sometimes, ALT-TAB followed by ESC will do the trick but not … Continue reading SQL Server: SSMS – Hung Symptoms – Mouse-clicks Don’t Register Due To Hidden Modal Window Behind SSMS

SQL Server: Delete In Chunks To Avoid Log Growth

Today, I had to perform a DELETE that happened to remove quite a bit of data. This caused two issues for me Log file growth which fills up the Transaction Log of the DB TempDB was getting full To avoid both problems I deleted in chunks. OPTION #1: DELETEing in Chunks is easier than you … Continue reading SQL Server: Delete In Chunks To Avoid Log Growth

SQL Server: DROP All But A Few Tables With PowerShell (or DROP ALL)

Recently, I received a request to backup a dozen tables or so tables out of 12 thousand tables. I had to retain all the indexes, statistics etc. The goal was to hand this over to the vendor for analysis as a database backup. I could have copied the selected tables over to a new database … Continue reading SQL Server: DROP All But A Few Tables With PowerShell (or DROP ALL)

SSAS: Automate SSAS Backups With PowerShell

I was looking for a solution to automate SSAS backups using PowerShell. By "automate", I mean the following: Backup one or more SSAS databases in an SSAS instance to a network location Automatically cleanup backups that are older than [x] days Schedule the backups via SQL Server Agent with minimal overhead Backup multiple host instances/databases … Continue reading SSAS: Automate SSAS Backups With PowerShell

PowerShell: SQL Server Services Startup Mode Change

This is one of those extremely simple posts where everyone who does PowerShell knows how ridiculously simple it is to do and you will too today. You will look like a magician to the uninitiated. Today, I had about 5 hosts running 4 instances of SQL Server each and I had to Stop all SQL … Continue reading PowerShell: SQL Server Services Startup Mode Change