2023 in Review – Steve’s Perspective
2023 was another transition year as I continue to navigate my ALS with work. It has become harder to write or at least more work is required. I use...
2024-01-05
51 reads
2023 was another transition year as I continue to navigate my ALS with work. It has become harder to write or at least more work is required. I use...
2024-01-05
51 reads
agnosthesia – n. the state of now knowing how you really feel about something, which forces you to sift through clues hidden in your own behavior, as if you...
2024-01-05
83 reads
While I was at a conference recently, someone asked me about the Scripts Folder feature in SQL Compare and how to set that up. This post just looks at...
2024-01-05 (first published: 2023-12-20)
547 reads
Alternate title: How do I tell how far I am on that command? This little command (frequently with a WHERE ... Continue reading
2024-01-05 (first published: 2023-12-26)
1,082 reads
SQL Bits has been my favorite data platform event for years. Both it and the PASS Data Community Summit hold special places in my heard and I enjoy going,...
2024-01-04
31 reads
Ever since the release of Always On Availability Group (AG or HADR) in SQL Server 2012 the adoption ratio is increasing. A lots of my clients too are adopting...
2024-01-03 (first published: 2023-12-25)
4,337 reads
According to Rod Trent, Kusto is named after Jacques Cousteau. He says, “We are exploring the depths of our data” by searching and querying our Azure log data. His...
2024-01-03 (first published: 2023-12-26)
323 reads
After several discussions with the Microsoft team and chatting with Sunil Sabat about the testing I was conducting, the conclusion was...
2024-01-03
4 reads
It’s a holiday today, but I’m dropping this as I spent last week working on it. I wrote about having a career plan on Friday, with a few notes...
2024-01-01
44 reads
I got this question from an account rep: if a customer is using SQL Prompt and a snippet, for example AT, that was also used as an alias, is...
2024-01-01 (first published: 2023-12-13)
278 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