Looking back to 2018

I can see all the way back to 2018 with these!

Note: This post is not a technical one, but one focusing on a professional (and maybe personal) growth. As we’re already well on our way to 2019, I figured that now is as good time as any to look back, all the way to the year 2018! As I mentioned in passing in a previous post, I did end up leaving the company I had worked for 20 years, and while being a small step to mankind it was quite a huge leap to me.

It also taught me few things, which I figured are worth sharing.

Continue reading “Looking back to 2018”

My favorite PerfMon counters

About two months back I ended up moving to another job, which has unfortunately kept me to be bit too occupied to find the time to blog, until now. Due to this previously mentioned career change, I have been working quite a bit with monitoring, and it gave me a spark to write this post about my favorite PerfMon counters.

Monitoring!

Like most DBAs I rely quite a lot on monitoring, and like most DBAs I too have my own set of PerfMon counters that I rely on to provide me an accurate view of what’s happening in the environment I am administering. In this post, I’ll describe what are my favorite PerfMon counters.

Continue reading “My favorite PerfMon counters”

Treating database as a code

code
Everything as a Code

Over the last two years I have been working lot on improving the tooling and processes related to database development at where I work. One concept born out of this work is what we have started calling a “Database-as-a-Code” model. Originally the idea was to introduce some of the good practices, such as version control, build automation and unit testing to database development. Over the time it has evolved to include even more, in an effort to break down traditional silos between software developers, database developers and the operations people.

In this post I’ll describe some of the decisions we made and the steps we have taken in our Database DevOps journey.

Continue reading “Treating database as a code”

Connecting to SQL Server instance through Dedicated Admin Connection

Dedicated Admin Connection is one of the easy-to-forget features in SQL Server that can really save your day. DAC (no relation to Data-Tier Applications, just shares the acronym), as it’s often called, is the way you can try to access a SQL Server instance that is in such a bad shape, that no normal connection is available. This can be due to resource exhaustion or if you happened to create a slightly wonky logon trigger. In this post we’ll look at how you enable Dedicated Admin Connection (for remote users) and how you connect to SQL Server using the DAC.

Continue reading “Connecting to SQL Server instance through Dedicated Admin Connection”

Offloading DBCC CHECKDB

I recently had a discussion about the ability to offload DBCC CHECKDBs to a secondary database using Active Secondaries in SQL Server Availability Groups. While it is fully possible to run database consistency checks against secondary database (and there’s plenty of recommendations floating around for doing this), it needs to be pointed out that using Availability Groups for this does not equal of running checks on the primary database.

Let’s consider this for a bit…

Continue reading “Offloading DBCC CHECKDB”

Logical Joins: OUTER JOIN

In my previous post about logical joins I wrote about the most common type of SQL Server join, the INNER JOIN. Naturally the logical follow-up is to look at the OUTER JOIN. Syntax for OUTER JOIN is bit different from the INNER JOIN, as you need to define either LEFT, RIGHT or FULL keyword (more about FULL in another post). Unlike the INNER JOIN which only returns rows from the tables if there are equal values in join column, OUTER JOIN will return all the rows from either LEFT or RIGHT even if there is no matching value in the table you are joining.

Continue reading “Logical Joins: OUTER JOIN”

Logical Joins: INNER JOIN

While back I wrote this blog post about SQL Server joins, the focus back then being in the physical ones. So I figured that now would be a good time to re-visit the topic and look at the logical joins also. Where the physical joins are decided by the SQL Server engine the logical joins are the ones we write. There are quite a few different kind of logical joins, so I will be writing multiple posts about this topic.

Continue reading “Logical Joins: INNER JOIN”