Hey, Welcome!

I am Marcin and I blog about SQL Server and sometimes random things.

Please also check out my two other projects:
SQLWATCH - Open Source SQL Server Monitoring,
Data Community Event Aggregator

Looking for help with SQL Server? I can help you. Are you trying to solve a complex data problem or looking for digital tranformation? I run Sargable Data Consultancy company that may be able to help you.

You can also follow me on Twitter @marcingminski and GitHub.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Also check out my dbo.weekly newsletter about #allthingsdata and SQL Server.

When to use negative identity

The identity value in relational databases is a field that increases automatically. It is often used to create surrogate primary keys. Surrogate keys Surrogate keys are meaningless and are only used to uniquely identify the row, not the data itself. For example, assume the following table: As we can see,

How I use dbatools to automate SQL Server installs

I lot of you have asked me to expand on the automated SQL Server installation I mentioned in my previous article: dbatools is a free PowerShell module with over 500 SQL Server best practice, administration, development and migration commands included https://dbatools.io/ The dbatools team have spent long hours making sure

Use CONTEXT_INFO to avoid firing triggers

DML Triggers are commonly used to apply some business rules to the data in the table. The most common implementation would be updating the date_updated column automatically whenever the data in the table changes. For the illustration, this can be done with a following trigger: However, there are times where

Why I use VMware Workstation instead of Hyper-V on my laptop

Being able to run virtual machines on our local computers, whether for testing or development is very convenient and almost natural. Hyper-V is part of Windows and is an obvious choice for many. The main advantage is that it’s free. And that’s about it. This post is based on recent

Rapid SQL Server test instances with Docker and Azure

As a DBA, developer, and more importantly the creator of SQLWATCH.IO, I need the ability to rapidly deploy and test different SQL Server configurations or test different upgrade variations from one version of SQLWATCH to another. This is quite laborious, time-consuming tasks as I either have to build a new SQL

How to intelligently auto-cycle ERRORLOG using T-SQL

In my previous post, I described different ways to read very large SQL Server Log (ERRORLOG) – 5GB to be exact. However, this was a reaction to something that has already happened. In this post, I will show you how to prevent this from happening at all.

Add colours to the ERRORLOG

When dealing with large logs I often find it difficult to find the information we are looking for. To make it easier, we can use PowerShell to add colours the ERRORLOG based on string patterns Note this will only work when using the Select-String command. Remote ISE Even though we need physical

TSQL Tuesday #127 – Non SQL Tips and tricks

This month’s T-SQL Tuesday is hosted by Kenneth Fisher and is quite interesting as it has nothing to do with T-SQL. Here’s my very short contribution Multi-line typing with Alt Mind blowing hack that works in majority of text and code editors. Press Alt and highlight the area where you

T-SQL Tuesday #126 – [email protected]

This is my first T-SQL Tuesday contribution! If you are new to this concept, as I was, you can read more about it on the T-SQL Tuesday homepage. This month’s invitation is from Glenn Berry. You can read more about the invitation by clicking on the logo below: What you