What I actually do at Microsoft
I started working at Microsoft in January 2022. I enjoy it. I even wrote a stream-of-consciousness post about it last year. A significant part of our job in the...
2024-06-28 (first published: 2024-06-10)
355 reads
I started working at Microsoft in January 2022. I enjoy it. I even wrote a stream-of-consciousness post about it last year. A significant part of our job in the...
2024-06-28 (first published: 2024-06-10)
355 reads
In Azure Data Factory (ADF, but also Synapse Pipelines and Fabric Pipelines), you have a typical scenario where you retrieve some metadata from a database and then loop over...
2024-06-27
149 reads
Newsletters? Spam protection? Image galleries? We have you covered, no plugin needed.
2024-06-26
18 reads
As a Software Engineer, i would like to learn how to dockerize my Python Fast API Framework and use this dockerize application in my lambda function. This will allow...
2024-06-26 (first published: 2024-06-07)
183 reads
Watch this video on YouTube
I like using ChatGPT. But I don't like the $20/month price tag for using OpenAI's app, especially given the API costs fractions of a cent.
So...
2024-06-26 (first published: 2024-06-10)
310 reads
This book was recommended by some of my colleagues, so I decided to give it a try. After finishing the book, I was pleased that I did. As the...
2024-06-24 (first published: 2024-06-05)
480 reads
There are quite a few different ways that you’re likely to see window functions evidence themselves within your execution plan. Let’s take a look at one example. Window Functions...
2024-06-24
47 reads
2024-06-24
22 reads
Let’s have devs look at their own query performance. Yes, please, sign me up for that! Sometimes, it’s hard for me to know the best course of action, especially...
2024-06-24 (first published: 2024-06-03)
629 reads
I recently had an issue in one of my Git repos, and decided to drop all my local changes and just pull down from the remote. This post looks...
2024-06-24
103 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