Azure-Sql-Db

SQL Interview: 93 Rebuilding a clustered index

SQL Interview: 93 Rebuilding a clustered index

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

The table dbo.Customers has a clustered index CX_dbo_Customers on the CustomerID column. It also has two non-clustered indexes. One is on the CustomerName column and has an included column of PhoneNumber. The other non-clustered index is on the CityName column.

2025-12-03

SQL Interview: 92 SELECT without specified order

SQL Interview: 92 SELECT without specified order

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Intro

Question:

You issue the following query against the dbo.Customers table:

SELECT * FROM dbo.Customers;

The table has a clustered index on the CustomerID column.

When you have not specified an ORDER BY clause, which order will the rows be returned in?

2025-11-29

SSMS Tips and Tricks 7-17: Git integration

SSMS Tips and Tricks 7-17: Git integration

Early versions of SSMS included the ability to work with source control systems. The way that worked was that SSMS implemented an SCCI (Source Code Control Interface). It would let you connect to any source control system that implemented that interface.

For a while, SSMS lost any ability to talk to source control. I thought that was a pity as I make extensive use of projects within SSMS and source control is where I want them stored.

2025-11-27

SQL: ANSI string concatenation with the || and ||= operators

SQL: ANSI string concatenation with the || and ||= operators

One change that was applied to Azure SQL Database a while back, and is coming in SQL Server 2025, is the use of ANSI string concatenation operators.

SQL Server has been using the + sign as a string concatenation operator since the early days, but that’s the same operator that’s used for numbers, and it’s not the ANSI standard. You’ll find that other database engines like PostgreSQL do not use + to join strings together; they use the || operator. I’ve been writing quite a lot of PostgreSQL lately, and avoiding using + to concatenate strings is always a challenge for my coding muscle memory.

2025-11-26

SQL Interview: 91 Table variables and memory

SQL Interview: 91 Table variables and memory

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

A developer in your team has observed that your database servers are very I/O bound. He thinks the I/O is simply too slow.

What he’s suggesting is that you replace all use of temporary tables with table variables. His argument is that they are memory-based instead of disk-based and that this should help to reduce the I/O load. Your applications make heavy use of temporary tables, and most have large numbers of rows.

2025-11-25

Echoes from the field 9: Encryption in SQL Server (Part 2)

Echoes from the field 9: Encryption in SQL Server (Part 2)

During a recent consulting engagement, I was asked about how to use column-based encryption in SQL Server. In this article, which is the second part of a two-part series, let’s explore how to get started using column-based encryption.

In the previous post , I provided background information about encryption and certificates.

If you’re not very familiar with these technologies, you should read that previous post before this one.

Encryption Technologies in SQL Server

Way back in SQL Server 2005, Microsoft introduced an amazing array of technologies. I suspect that many SQL Server professionals aren’t aware of just how many technologies were introduced in that release. It’s not surprising that professionals are still learning about a number of these technologies, even 20 years later. In particular, questions regarding certificates, keys, and column-based encryption still draw blank responses from most SQL Server professionals.

2025-11-22

SSMS Tips and Tricks 7-16: Using encodings when opening or saving files

SSMS Tips and Tricks 7-16: Using encodings when opening or saving files

SSMS has the ability to work with different encodings when you are opening or saving files.

When you use File and Open, note that beside the Open button is a drop-down arrow:

The Open With option leads to this:


In that screen, you can choose an existing value or click Add to add another program that you want to use for opening files of that type:

As an example, you might want to use a different XML or JSON editor.

2025-11-19

Echoes from the field 8: Encryption in SQL Server (Part 1)

Echoes from the field 8: Encryption in SQL Server (Part 1)

During a recent consulting engagement, I was asked about how to use column-based encryption in SQL Server. In this article which is the first of a two-part series, let’s explore the technologies involved and how to get started with using column-based encryption. Next time, we’ll continue with using these technologies for column-based encryption.

Encryption Terminology

Encryption is the science of hiding secrets. Information that needs to be protected (often called plaintext) is converted (or encrypted) to a form (often called ciphertext) that is difficult for another person to read within a reasonable period of time.

2025-11-18

SQL Down Under show 93 with guest Simon Sabin discussing data-related development, AI tools, and the upcoming SQL Bits is now published!

SQL Down Under show 93 with guest Simon Sabin discussing data-related development, AI tools, and the upcoming SQL Bits is now published!

It was great to catch up with Simon Sabin today and to have him on another SQL Down Under podcast.

Simon is the founder of Sabin.io where he revolutionizes the data practices of his clients.

Simon has a track record spanning diverse sectors like finance, retail, insurance, and motor sports and is recognized as a data expert. I’ve known Simon for a long time. He was a Data Platform MVP from 2005 to 2024, and a fellow member of the Microsoft Regional Director program.

2025-11-18

Data Tales 12: The case of the code that refused to execute

Data Tales 12: The case of the code that refused to execute

This is the twelfth tale in a series of stories about data. I hope you enjoy the series.

Today’s tale relates to a SQL Server Integration Services (SSIS) package. It used the same architecture as other packages and on the same server, and even though it said it was successful, nothing happened. Let’s discuss why.

Some background information

At the site, a separate SSIS server (using an earlier version of SQL Server i.e., 2014) had been deployed. The server was used to run all the organization’s SSIS packages. These packages connected to several data sources:

2025-11-17