Kusto Detective Agency - Intro
While I mostly write about SQL Server, I have a soft spot for Kusto. In this series, I will explore solutions to fun challenges collectively known as the Kusto...
2025-04-27 (first published: 2025-04-26)
113 reads
While I mostly write about SQL Server, I have a soft spot for Kusto. In this series, I will explore solutions to fun challenges collectively known as the Kusto...
2025-04-27 (first published: 2025-04-26)
113 reads
In the bustling world of sports, leadership appears as a beacon of hope and direction. Imagine a football team, standing on the brink of a crucial match. The players,...
2025-04-25 (first published: 2025-04-08)
228 reads
There is a SET command in SQL Server that changes how much data is returned from some fields. This short post shows what I learned about the SET TEXTSIZE...
2025-04-25 (first published: 2025-04-07)
507 reads
A ton of new features for Microsoft Fabric were announced at the Microsoft Fabric Community Conference recently. Here are all the new features that I found most interesting, with some...
2025-04-23 (first published: 2025-04-09)
355 reads
This month’s invite is from Erik Darling, who invites you to make a video on any topic of your choice. I liked his reasoning for this and appreciate his...
2025-04-23 (first published: 2025-04-08)
221 reads
I recently had a new pipeline fail. It was actually a copy of an old pipeline where I had made some adjustments into as part of a database migration....
2025-04-21 (first published: 2025-04-04)
363 reads
A customer asked if they needed to restore a database from backup to compare the schema in a database. They don’t and this post shows that. This is part...
2025-04-21 (first published: 2025-03-31)
283 reads
immerensis – n. the maddening inability to understand the reasons why someone loves you – almost as if you’re selling them a used car that you know has a...
2025-04-18
52 reads
In this post, I will guide you on how to deploy a dockerized simple flask-based TODO application to Azure Container Apps using Pulumi. You will Dockerize the Python application,...
2025-04-18
68 reads
If we aren't having the same conversation, we aren't going to be heard. That's what Charles Duhigg, author of The Power of Habit, covered in the following TED talk:
2025-04-18 (first published: 2025-03-31)
362 reads
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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