“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

Access is denied – Using DTCPing utility between two Windows Server 2016

Few days ago a client requested the configuration of MSDTC (Microsoft Distributed Transaction Coordinator). NOTE: If you want to know more about it here is a nice FAQ from Microsoft blogs - MSDTC Recommendations on SQL Failover Cluster? The client has 2 machines: one an application server and one a database server. Both run on … Continue reading Access is denied – Using DTCPing utility between two Windows Server 2016

SQL Server Operations Studio and VSCode: The wrong default datetimeoffset format

This post is to answer the question: "You are used to seeing in the format of yyyy-MM-dd right?" that I have raised on my blog post Don’t cutoff yourself with dates in T-SQL – Did you know…. As you could see from that blog post, my screen shots were from VSCode and in this case … Continue reading SQL Server Operations Studio and VSCode: The wrong default datetimeoffset format

Triggers: The hidden logic that will strike back – TSQL Tuesday #106

This month’s T-SQL Tuesday is brought by Steve Jones (b | t) and he wants to know if triggers causes headaches or happiness to us. This is the 106nd edition of TSQL2sDay - an Adam Machanic (b | t) brainchild.   Triggers are those kind of database objects that sometimes are the best bet but … Continue reading Triggers: The hidden logic that will strike back – TSQL Tuesday #106

I will be speaking @ SQLSaturday #795 Porto

On 29th September we will have SQL Saturday Porto and I’m proud to announce that I will be speaking! I will be speaking about dbachecks PowerShell module - dbachecks - Checking SQL Server environments with PowerShell. The event will be held at ISEP, Rua Dr. António Bernardino de Almeida, 431, 4249-015 Porto, Portugal and you … Continue reading I will be speaking @ SQLSaturday #795 Porto

Don’t cutoff yourself with dates in T-SQL – Did you know…

Almost all the applications we use have a lot of options. And, sometimes we even stumble across them by accident. Who's ever heard something like "Normal user don't even use 5% of Excel capabilities!"? Other options, we know they exist but because the default value it’s ok (so far) we tend to forget it. It … Continue reading Don’t cutoff yourself with dates in T-SQL – Did you know…

Did you know…you can change the default file encoding for new query on SSMS?

If you have been reading my last blog posts, you know that I’m currently working on a SQL code migration from Firebird to SQL Server. The client provided the scripts with all modules (Stored Procedures, functions, etc) and the steps I'm following (roughly speaking) for converting are: Open new query window Copy and paste de … Continue reading Did you know…you can change the default file encoding for new query on SSMS?