Sql-Server

SQL: Understanding Change Data Capture for Azure SQL Database - Part 2 - How does it work?

In the part 1 of this series, I discussed the positioning of Change Data Capture. In part 2, I want to cover how it works.

Log Reading

There are many ways that you can output details of changes that occur in data within SQL Server. Many of those methods require actions to occur at the time the data change is made. This can be problematic.

The first problem with this, is the performance impact on the application that’s making the change. If I update a row in a table and there is part of the process that writes details of that change to some type of audit or tracking log, I’ve now increased the work that needs to happen in the context of the application that’s making the change. Generally what this means, is that I’ve slowed the application down by at least doubling the work that needs to be performed. That might not be well-received.

2023-03-06

SQL: Understanding Change Data Capture for Azure SQL Database - Part 1 - Why?

I often need to capture the changes from one database into another. The most common reason is that I’m wanting to bring changes from a transactional system across into a data warehouse that’s part of a BI setup.

So which technology is best to use for this?

That’s not a trivial question to answer but here are some thoughts:

Replication?

Unfortunately, this one’s not available for Azure SQL DB as yet. Azure SQL DB can be a subscriber in Transactional Replication. We often use it this way. If we have an on-premises SQL Server, one of our favourite ways to get data into the cloud is by using Transactional Replication. (If you need to get your head around Replication with SQL Server, just head to our course here).

2023-02-26

SDU Tools v23 is now available for download

Just a heads-up that v23 of SDU Tools went out to SDU Insiders yesterday.

You can find details about SDU Tools here: https://sdutools.sqldownunder.com

In v23, we’ve added or enhanced the following:

  • ExcelSerialToDateTime - there’s so much corporate data stored in Excel, and if you need to import it to SQL Server, you quickly find that dates and times are a challenge. I have a friend who says that the only data types in Excel are numbers and strings, and that everything else is an illusion. I think that’s pretty accurate. This function takes one of the funky Excel decimal numbers (called a Serial) that represents a date and time, and converts it to a SQL Server datetime value.
  • DateTimeToExcelSerial - no prizes for guessing what this one does. It’s the opposite of the above.
  • We’ve done a lot of updates to internal data within the tools, like all up to date SQL Server build numbers, etc.
  • DateDimensionColumns now has StartOfWeek and EndOfWeek
  • DateDimensionPeriodColumns now has IsSameWeek, DayOffset, MonthOffset, and WeekOffset

You can see a short video on the new Excel conversion functions here: YouTube Video

2023-01-19

SDU Podcast 83 with guest Davide Mauri released

I recorded the first of a series of podcasts for the SQL Server 2022 timeframe recently. Once again, it was great to chat with another old friend Davide Mauri. Davide is a Principal Product Manager for Azure SQL Database.

Note that the topic I chose for today was the new  sp_invoke_external_rest_endpoint system stored procedure, and it’s currently only available for Azure SQL Database but I expect it will get ported to other flavours of SQL Server over time. Davide has been deeply involved with the development of this procedure.

2022-12-16

Data Science summit 2022 - Warsaw (and Hybrid) - SQL Server 2022 T-SQL

I’m always excited when I can get involved in conferences with our Polish friends.

Coming up very soon is the Data Science Summit 2022: https://dssconf.pl/en/

For this summit, I’ll be presenting a quick (around 40 minutes) session highlighting what’s changed in T-SQL for SQL Server 2022. I’m always so glad to see T-SQL enhancements in SQL Server and SQL Server 2022 has more than what we’ve seen in other recent versions. There are a number of very important enhancements that will take a little while to get our heads around, on the best way to use them.

2022-11-06

Cosmos Down Under podcast 5 - Charles Feddersen on the Azure Cosmos DB for PostgreSQL API

I’ve just finished publishing another show for the Cosmos Down Under Podcast. This time the guest is Charles Feddersen.

Charles (and ex-Melbourne local) is working for Microsoft in the Azure Cosmos DB team. His current focus is the PostgreSQL API that Azure Cosmos DB supports.

In this show, Charles discusses the state of the PostgreSQL market, how it’s implemented in the Azure Cosmos DB for PostgreSQL API, how that compares to Microsoft’s Flexible Server offering for PostgreSQL, distributed tables, scaling databases, and so much more.

2022-11-04

Architecture: Software as a Service Databases - Single DB or DB per Client

I have a varied client base. Many of my customers are traditional larger financial organizations. But I also work with start-ups and software houses. (Microsoft calls these ISVs - Independent Software Vendors).

Most software houses don’t want to sell software any more. Instead, they want to repackage their solutions as services i.e. they want to offer Software as a Service. (SaaS)

Converting an application to a service is not easy. Even Microsoft had false starts with moving their on-premises applications to cloud-based offerings.

2022-10-03

Cosmos Down Under podcast 4 with Guest Will Velida

I’ve just finished publishing another show for the Cosmos Down Under Podcast. This time the guest is Will Velida.

Will is an Engineer for Microsoft working in the Fast Track for Azure team. His focus is on application development and modernization. He is passionate about developers from all walks of life build great things using Azure. Prior to joining Microsoft, he has worked as a software engineer in the financial and agricultural sectors. He was also a Microsoft MVP in the Data Platform category, focusing on Azure Cosmos DB.

2022-08-31

T-SQL Tuesday 153: The Conference that Changed Everything for Me

This month, T-SQL Tuesday is hosted by an old friend of mine Kevin Kline. He’s an old friend as I’ve known him a long time, not because of age. (There are lots of miles left in Kevin).  The invite asked about a conference or event that changed your life, that created an opportunity, or just changed your life. It could be career related or another area.

Background

I was invited to join the Microsoft Regional Director program back in the early 2000’s. The RD program had grown out of the original DevDays events, and the RDs were the people who spoke at those events. By the time I joined, they were commonly used as speakers at events like TechEd around the world.

2022-08-09

Book Review: SQL Server Query Tuning and Optimization

I was pleased to be sent a pre-release copy of Benjamin Nevarez’s new book SQL Server Query Tuning and Optimization. Last time, I reviewed his High Performance SQL Server book.

This book seems to be somewhat new and somewhat an update, but this time with the main focus on query tuning and optimization. That’s pleasing as the main way to get better performance out of SQL Server is to fix the queries. much more so than anything to do with the hardware or server configurations that so many people focus on.

2022-08-05