A New Word: Licotic
licotic – adj. anxiously excited to introduce a friend to something you think is amazing – a classic album, a favorite restaurant, a TV show they’re lucky enough to...
2023-06-30
32 reads
licotic – adj. anxiously excited to introduce a friend to something you think is amazing – a classic album, a favorite restaurant, a TV show they’re lucky enough to...
2023-06-30
32 reads
I’m in Cambridge, UK this week for the internal Global Marketing Week and Level Up Conference. This is my first visit to Cambridge in 2023, and we have a...
2023-06-30 (first published: 2023-06-14)
267 reads
Twenty years ago, I stood in a courtroom and took an oath for a volunteer job I had no idea I would fall so much
The post Twenty Years as...
2023-06-30 (first published: 2023-06-26)
205 reads
Chaos engineering is fun but especially important when building solutions in the cloud. It is great leveraging the cloud to build something, whether that’s a globally distributed website with...
2023-06-28 (first published: 2023-06-08)
270 reads
Well, turns out code signing is pretty complex, so I’m writing this blog post as a guide for my future self. I hope he will appreciate, and perhaps some...
2023-06-28 (first published: 2023-06-10)
349 reads
I’ve had to type a few non-English characters lately, and this blog talks about how to do this. Another post for me that is simple and hopefully serves as...
2023-06-28
427 reads
Statistics objects are important for allowing the SQL Server Optimizer to make good estimates and form efficient execution plans. Related to that it's useful for us to understand when...
2023-06-28
156 reads
Parameter Sensitive Plan (PSP) optimization is a new feature in SQL Server 2022 that aims to improve the performance of parameterized queries. It is part of the Intelligent Query...
2023-06-26 (first published: 2023-06-08)
330 reads
I’ve been using Azure SQL Database for quite some while and have set up it in many various ways to run Ola’s Index Optimize and
The post Using Azure Automation...
2023-06-26 (first published: 2023-06-06)
456 reads
volander: n. the ethereal feeling of looking down at the world through an airplane window, able to catch a glimpse of far-flung places you’d never see in person, free...
2023-06-23
101 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 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