Too many times when I try to look at the history of a SQL Server Agent Job, I get this error: TITLE: .Net SqlClient Data Provider ------------------------------ Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=13.00.2210&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: The wait … Continue reading SQL Server: Timeout When Viewing SQL Server Agent Job History
Tag: Filter
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
PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables
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