The Redgate Summit: New York
The final 2024 Redgate Summit in the US takes place in a few weeks, on Aug 21. Redgate Summit: The Database Landscape is coming to the Microsoft Office at...
2024-08-05
27 reads
The final 2024 Redgate Summit in the US takes place in a few weeks, on Aug 21. Redgate Summit: The Database Landscape is coming to the Microsoft Office at...
2024-08-05
27 reads
We are trying to get apps and users off of using SQL accounts to access the Azure SQL DBs where I work. To make our lives easier, we are...
2024-08-05 (first published: 2024-07-25)
387 reads
bareleveling – v. trying to improve yourself without anyone else knowing about it, afraid that they’ll think it’s silly or grandiose or unnecessary, or that they’’ll end up calling...
2024-08-02
27 reads
One of the little details that I find matter more and more in enterprises is understanding why a tool behaves a certain way. OSS/home-grown ones often have limited docs,...
2024-08-02 (first published: 2024-07-19)
105 reads
I have heard about many interesting things about programming in Rust and I decided to use Rust for one of my applications. I enjoyed the programming experience in Rust...
2024-08-02 (first published: 2024-07-20)
220 reads
In the digital age, data is the new gold, but it's worthless if you can't understand and use it. That's where SQL (Structured Query Language) comes in. SQL is...
2024-08-02
37 reads
Have you heard the term "fediverse" and wondered what the heck it is? Doc Pop is here to explain. And no, it's not a cheese pun.
2024-08-02
47 reads
Are you struggling with a laggy redo and a build up in the redo queue on your readonly secondaries? Are you suffering with high PARALLEL_REDO_TRAN_TURN waits? Then this magic...
2024-07-31 (first published: 2024-07-17)
338 reads
Here's how we used WordPress Components and Tailwind CSS to build our local development app, Studio.
2024-07-31
44 reads
I did a couple of other posts on Elastic Jobs. But now I want to set them up with Terraform. This aligns with how we create infrastructure where I...
2024-07-31 (first published: 2024-07-19)
166 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