T-SQL Copy & Paste Pattern – Increasing a performance problem

Disclaimer: The title is my assumption because I saw it in the past happening this way. This blog post aims to make you remember something: something that is obvious to you, might not be obvious to others. Scenario: A client has a process which consists of a stored procedure that wraps a bunch of other … Continue reading T-SQL Copy & Paste Pattern – Increasing a performance problem

Allow SQL Server Agent jobs management for non sysadmins

I don't know about your experience when it comes to SQL Server Agent jobs but often I receive requests to grant permission so that clients can handle their jobs in an autonomous way. Any problem with that? It depends 😄 If you're not familiarized with the difficulty this can bring, let me share with you … Continue reading Allow SQL Server Agent jobs management for non sysadmins

“Ups…I have deleted some data. Can you put it back?” – dbatools for the rescue

Few days ago I received a request to restore a dozen of tables because someone have deleted more data than it was supposed. I immediately thought about dbatools for the job! NOTE: I also thought about SSMS "Import/Export Data". And this is ok when someone says "it's to run just once, just now". When you … Continue reading “Ups…I have deleted some data. Can you put it back?” – dbatools for the rescue

Scripting SQL Server objects with dbatools – Beyond default options

Probably you had the need to script out some objects from a SQL Server instance/database and this is quite easy. You just need to right click on the object (well...not on every single one, try it with an Availability Group :-), no script option available) select "Script XXXX as" and you have it. But have … Continue reading Scripting SQL Server objects with dbatools – Beyond default options