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
Month: February 2018
SQL Server: Visualize Your Backups For Insights – By Month Day, Time etc.
Backups are a very important part of a DBA's job. Understanding when they have happened and when they have not happened is even more important. Quantifying things quickly can mean the difference between good and bad decisions when you are in a bind. Note: If you are looking to do something similar with Oracle, please … Continue reading SQL Server: Visualize Your Backups For Insights – By Month Day, Time etc.
PowerShell: Find & Replace SQL Server Stored Procedure/View/UDF/Trigger Code En Masse Based On Custom Criteria
Update April 19, 2019: Thanks to Tim (in comments), the updated script can also do find/replace in not just stored procedures but also views, UDF's and triggers. Today, a need came-up where a bunch of stored procedures had to be altered based on certain criteria. Easy way: Obviously, the easiest way would be to script … Continue reading PowerShell: Find & Replace SQL Server Stored Procedure/View/UDF/Trigger Code En Masse Based On Custom Criteria
PowerShell: Add, Remove, Copy And Move Users To Another AD Group Conditionally
Be sure to read the related blog post first before proceeding! PowerShell: Lookup Active Directory Accounts Flexibly/Exhaustively For A List Of First/Middle/Last Names If you are an AD admin, you are very likely a pro at managing AD group membership but for mere mortals, this can be a tedious task. Please read on to find out … Continue reading PowerShell: Add, Remove, Copy And Move Users To Another AD Group Conditionally