Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
 
The Voice of the DBA
 

An Eventual Consistency Scam

Recently I sold a car. It was an interesting process as I hadn't sold a car to someone I didn't know in a long time. I listed the car in a few places and was surprised by the interest. It was an EV (I guess it still is), and with the rising price of fuel in the US, maybe I shouldn't have been surprised. I arranged a couple of showings, but I had quite a few people offer to buy the car after only seeing a few pictures, asking if I'd take a check.

Some of you might be wary at this point, and I was. However, my wife had gotten similar offers from a few people when she was selling a horse. She never did, but we talked about where the scam is if someone sends a check and says they'll wait for the funds to clear.

I was curious, so I agreed to take checks from three people. Two of them sent the checks in registered letters, with proof of delivery. This is a USD$20 cost right now. One sent a FedEx letter. That probably cost a similar amount. In all cases, the people said they were sending enough for the car to be shipped, on top of my asking price. I also told them I'd need the check to clear, and they agreed.

The first one I received, I drove by the bank while in town and deposited the check. I discussed the check clearing with the bank. I was told by the teller that I'd be able to get $400 that day and the rest the next day. I asked about when the check actually clears and the funds were moved, since all three checks were drawn on non-Colorado banks. The teller realized I wanted validation and said it would be 7-10 days and gave me a customer service number to call.

I haven't used checks very much the last few years. While I know technology has improved, what has mostly happened is that the banks operate on a system of trust that appears to move faster even though many of the underlying systems are older and still slow. When you deposit a check, the bank doesn't validate anything. That might seem strange, but it doesn't. It sends the bank routing number, the account number, and amount through a process that reconciles the money with another bank.

Think of this as data in two different databases, which it really is. The update in bank 1 isn't sent to bank 2 for a period of time. The update from bank 2, which debits their account and credits bank 1, takes longer. In this case, the time in days.

That's serious eventual consistency.

What happened with person 1 was that they asked for confirmation of the deposit, and then texted me 2 days later saying that they'd need a deposit for the shipping company. I repeated that I'd need the funds to clear. They wanted to argue about needing to move fast, but I ignored them. After a few days, they said they were sick and could I front them money for a few bills and they'd drive to get the car. I didn't agree and eventually they gave up communicating with me. A week after the deposit, I got a "funds failed to clear" message from my bank. No charge to me, but the "money" that appeared to be in my balance disappeared.

Person 2 texted me the image of their FedEx note, and when I said I would wait a week for the check to clear, they asked me to tear up the check and send them a picture. I declined. Person 3 sent a check blindly, saying they were trusting me. I ignored future texts, but they persistently kept checking for 12 days. In all cases, these are checks on real banks, but fake names and accounts.

Checks are insecure. And just like plenty of data replication systems that try to synchronize data between two databases, there can be issues if you do not have a two-phase commit.

I wrote this so many of you would be aware of a scam that is out there. Watch out and warn your less tech-savvy friends. However, also be careful when you work with data that lives in two places. There is a lot of overhead to ensuring the data is correct in all the systems, and there are good reasons for this. Sometimes eventual consistency isn't good enough.

Note: A few people are concerned about the check images linked. Those are fake people and fake accounts.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 
 Featured Contents
SQLServerCentral Article

How We Reduced SQL Server Infrastructure Costs by 33% on AWS: Lessons From a Database Operations Manager

Pravalik Medi from SQLServerCentral

Read a story about how one company saved substantially on their cloud costs with a few simple changes and no interruptions to service.

Technical Article

What does a modern DBA actually do? 6 key points from a senior DBA

Additional Articles from SQLServerCentral

We sat down with Lee Brownhill, a senior DBA and Redgate Ambassador with 20 years of experience, to get his honest take on where the role is heading – and what database professionals are actually focused on right now.

Blog Post

From the SQL Server Central Blogs - TRY_PARSE Limitations: #SQLNewBlogger

Steve Jones - SSC Editor from The Voice of the DBA

I got a notification from a question I’d posted at SQL Server Central: Getting the Average. A user had posted their repro didn’t work, with no real comment. As...

Blog Post

From the SQL Server Central Blogs - How I Troubleshoot a Slow SQL Server Live

MarlonRibunal from Marlon Ribunal - SQL, Code, Coffee, etc.

No two SQL Server environments are alike. A fix that resolves a performance issue in one environment may not work in another because every SQL Server instance has different...

Architecting Power BI Solutions in Microsoft Fabric

Steve Jones - SSC Editor from SQLServerCentral

Business Intelligence (BI) tools like Power BI are used by a wide range of professionals, creating diverse and complex scenarios, and finding the right solution can be daunting, especially when multiple approaches exist for a single use case. The author distills his 17 years of experience on various data platform technologies in this book to walk you through various Power BI usage scenarios.

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

BIT_COUNT() V

What does this return on SQL Server 2025?
select bit_count(null)

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Rebuilding All Indexes

I have added a few indexes to one of my tables in SQL Server 2025:

ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
    PRIMARY KEY (CustomerID);

-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerPhone
ON dbo.CustomerContact (phone);

I then do this to disable one index:

alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disable

I see this when I check the index status:

Index status for CustomerContact

I decide to rebuild all indexes with this command:

ALTER INDEX ALL ON dbo.CustomerContact rebuild

After I do this, what will I see for the index status?

Answer: All three indexes are now enabled and up to date

Explanation: All three indexes will be enabled and available. The rebuild option will enable disabled indexes. Ref: ALTER INDEX - https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql?view=sql-server-ver17#arguments

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2019 - Administration
In-place OS upgrade or migration to new OS? - Putting this here as we're currently on SQL Server 2019 installed on Windows Server 2019, all hosted as VMs in Azure.  We've recently been handed down a directive to upgrade to Windows Server 2025 by the end of Sept (which, needless to say, is NOT going to happen by that time.) My preference would be […]
SQL Server 2019 - Development
Partitioning a table with TEXTIMAGE_ON option - I have a table that ends in ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]. I'm about to partition this table and I'm wondering if I can stick the blobs onto a separate filegroup / file while partitioning the rest of the data. Or do I have to put the blogs on the individual partitions? Here's the sanitized version […]
Editorials
Never is Not the Policy - Comments posted to this topic are about the item Never is Not the Policy
Learn From History - Comments posted to this topic are about the item Learn From History
A Worse Computer; A Better Car - Comments posted to this topic are about the item A Worse Computer; A Better Car
Building Great Software - Comments posted to this topic are about the item Building Great Software
Article Discussions by Author
Automating SSAS Multidimensional Security Audits with PowerShell - Comments posted to this topic are about the item Automating SSAS Multidimensional Security Audits with PowerShell
Rebuilding All Indexes - Comments posted to this topic are about the item Rebuilding All Indexes
Automating OSM Data Refresh in Power BI’s Azure Maps Reference Layer - Comments posted to this topic are about the item Automating OSM Data Refresh in Power BI’s Azure Maps Reference Layer
Database Mail Configuration - Comments posted to this topic are about the item Database Mail Configuration
The SQL Server MCP Server - Comments posted to this topic are about the item The SQL Server MCP Server
The Hidden Danger of Wildcard Operators In Join Operations - Comments posted to this topic are about the item The Hidden Danger of Wildcard Operators In Join Operations
OUTER APPLY Fundamentals: Part 2 - Comments posted to this topic are about the item OUTER APPLY Fundamentals: Part 2
SQL Server 2022 - Administration
Fulltext filter daemon host (FDHost) process has stopped abnormally - We have performed a side-by-side upgrade, from SQL Server 2016 to 2022 Developer Edition, for our instance hosting our Azure DevOps catalogs. Having backed up and restored all of our Azure DevOps (formerly TFS) catalogs/databases to the new database server, we have been experiencing the following severity 17 alert several times per day: "The fulltext […]
SQL Server 2022 - Development
STRING_AGG DISTINCT - Has anyone written a wrapper function (or similar) around STRING_AGG() to allow the retrieval of distinct values only? If yes, I'd be interested to see it, thanks.
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -