Book Review: My Effin Life
This is very off topic, but I’ve been a fan of Rush since I was about 12 years old. Their Moving Pictures This is a few thoughts on Geddy...
2024-03-06
152 reads
This is very off topic, but I’ve been a fan of Rush since I was about 12 years old. Their Moving Pictures This is a few thoughts on Geddy...
2024-03-06
152 reads
A customer recently asked about using FKs in SQL Data Generator, and I decided to write a short post showing how these work. The Scenario I’ve got a copy...
2024-03-06 (first published: 2024-02-26)
330 reads
A brief overview of the benefits and challenges of automated testing and how Redgate’s Test Data Manager can help. Automated testing uses software tools to execute predefined tests on...
2024-03-06 (first published: 2024-02-26)
172 reads
I got this message recently while committing some changes: This post shows my work in adding Git LFS support to GitHub. Another post for me that is simple and...
2024-03-04 (first published: 2024-02-21)
185 reads
IT and data professionals, I implore you – know thy platform. All of it. Not just the layer your job is tasked with. Modern public cloud (or any infrastructure...
2024-03-04 (first published: 2024-02-22)
222 reads
Navigating the Database Landscape is the headline of our Redgate Summit in Atlanta on Mar 13. I’m doing the Keynote with Grant Fritchey and Kathi Kellenberger with this title,...
2024-03-04
82 reads
aesthosis– n. the state of feeling trapped inside your own subjective tastes – not knowing why you find certain things beautiful or ugly, only that you do – wishing...
2024-03-01
91 reads
EightKB is back! The biggest online SQL Server internals conference is back in 2024…it’s all happening on August the 8th! We’ve open our call for speakers, you can submit...
2024-03-01 (first published: 2024-02-21)
257 reads
A customer asked recently why Flyway doesn’t detect the filegroup for some changes. I showed them it does and decided to write a post on this. I’ve been working...
2024-03-01 (first published: 2024-02-16)
177 reads
One of the things I had to do recently in a demo was access the Git command line. The way I did it impressed a customer, so I put...
2024-03-01
65 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