T-SQL Tuesday #187–Solving Problems
This month we have a great invite from Joe Fleming, a first time host of T-SQL Tuesday. Joe reached out when I requested some hosts and I’m glad he...
2025-06-10
105 reads
This month we have a great invite from Joe Fleming, a first time host of T-SQL Tuesday. Joe reached out when I requested some hosts and I’m glad he...
2025-06-10
105 reads
The crime spree in Digitown is not ending. This time 20 cars have been stolen and we need to find where they’re stored.
The problem
This is the abridged case description....
2025-06-09 (first published: 2025-05-16)
281 reads
One of the biggest challenges with monitoring data is managing the volume over time. Lots of bespoke/home-grown solutions don’t do this well, and some commercial products have a gross...
2025-06-09
36 reads
With the release of SQL Server 2025, Microsoft is firmly positioning its flagship database platform as an enterprise-ready AI solution. Having spent time with the preview builds and working...
2025-06-09 (first published: 2025-05-19)
535 reads
Build a Dockerized Todo List RESTful API in C# with GitHub Actions and Azure Container App: A Step-by-Step GuideBuilding scalable, portable, and easy-to-maintain applications has become necessary in today's...
2025-06-08
56 reads
C++ is a highly versatile language for developing console applications, batch processing, and performance-critical applications. While it has traditionally been less explored for building RESTful APIs, modern libraries like...
2025-06-06
46 reads
Thank you to everyone who contributed to this month’s T-SQL Tuesday!
Here’s a roundup of the posts.
2025-06-06 (first published: 2025-05-21)
844 reads
I always try and ensure that I post my slides to my talks here on my blog. Here are the slides that I used for my Quantum Computing and...
2025-06-05
22 reads
I had someone ask me about using triggers to detect changes in their tables. As I explained a few things, I thought this would make a nice series, so...
2025-06-04
79 reads
A step-by-step guide to installing SQL Server 2025 Private Preview.
2025-06-04
3 reads
By Steve Jones
It’s Prime Day. A few of my recommendations, since I want to do some...
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers