SQL Server: Run A Very Large Script By Splitting It Into Pieces Using PowerShell

Everyday is an interesting day in the life of a DBA. Today, I received a request to run in a HUGE script. This script had 125k INSERT statements each in a separate line. Just opening the script was an issue, leave alone running it into a database. You get this error in SSMS just trying … Continue reading SQL Server: Run A Very Large Script By Splitting It Into Pieces Using PowerShell

SQL Server – Running A Script Or SQL On Multiple Instances/Databases With PowerShell – Level 100

Today, I received a really simple request. There was an UPDATE statement that had to be run on quite a few databases in multiple instances.  This was for a vendor software we use and the statement was sent to me by a Helpdesk professional who manages the product. You need to have the SQLPS (older) … Continue reading SQL Server – Running A Script Or SQL On Multiple Instances/Databases With PowerShell – Level 100

PowerShell: CTRL+E, instead of F8 for SQL folks to run selection in ISE

Hotkey to run selection in PowerShell ISE is F8. Hotkey to run selection in SSMS is CTRL+E. For those of us constantly switching back and forth between the two, you know very well how many times we hit the "other" hotkey! Well, now you can have the same key to run selection in both SSMS … Continue reading PowerShell: CTRL+E, instead of F8 for SQL folks to run selection in ISE

Wait & Notify via email When A Process Completes – Using PowerShell

A colleague of mine was copying a large file over the network using "RoboCopy". As a good citizen, he throttled the copy using the "/IPG" switch of RoboCopy. For information sake, /ipg:n Specifies the inter-packet gap to free bandwidth on slow lines. After starting the copy he informed me that it would complete in around … Continue reading Wait & Notify via email When A Process Completes – Using PowerShell