SQL Saturday New York City 2025 is Back!
After missing last year, SQL Saturday New York City is back in 2025. I’m excited to go to the event and honored to speak there. I love visiting New...
2025-05-06
127 reads
After missing last year, SQL Saturday New York City is back in 2025. I’m excited to go to the event and honored to speak there. I love visiting New...
2025-05-06
127 reads
This month, I am hosting T-SQL Tuesday for the very first time. T-SQL Tuesday is a monthly blog party originally created by Adam Machanic in 2009 and currently curated...
2025-05-06
20 reads
I had a customer recently that was asking about Linked Servers and some development advice. I was going to show them a few things and realized I hadn’t created...
2025-05-05
305 reads
I was chatting with a customer recently and they wanted to know which host was sending in queries that were causing problems in real time. This post looks at...
2025-05-05 (first published: 2025-04-21)
523 reads
Now that I’ve completed both TOGAF 9 tests, I am putting up a couple of quick posts on how I prepared for these Enterprise Architecture exams.
2025-05-05
36 reads
In the intricate world of business, where precision and efficiency are paramount, managing database dependencies can often feel like navigating a labyrinth. Imagine having a tool that not only...
2025-05-05 (first published: 2025-04-21)
289 reads
If you are not embarrassed by your past self, you have probably not grown up yet. – from Excellent Advice for Living While I’d like to think most of...
2025-05-02
23 reads
I heard someone say recently that you can’t change a primary key value in a row. That’s not the case, so I decided to show a quick proof of...
2025-05-02 (first published: 2025-04-23)
520 reads
Now that I've completed both TOGAF 9 tests, I am putting up a couple of quick posts on how I prepared for these Enterprise Architecture exams.
2025-05-02
34 reads
You can now run powerful LLMs like Llama 3.1 directly on your laptop using Ollama. There is no cloud, and there is no cost. Just install, pull a model,...
2025-05-02 (first published: 2025-04-17)
438 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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
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