Goodbye to Good Morning!
For two years and three months, since April 2020, I’ve posted a tweet saying “Good Morning!” on every workday. I think I missed one. I was late for a...
2022-07-07
44 reads
For two years and three months, since April 2020, I’ve posted a tweet saying “Good Morning!” on every workday. I think I missed one. I was late for a...
2022-07-07
44 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-07-06
39 reads
I was renewed this week as a Microsoft MVP. This is my 15th award in a row and each year this happens it is an honor to be recognized...
2022-07-06
26 reads
I noticed Adam Saxton post a tip on the Guy in a Cube YouTube channel about publishing reports from Power BI Desktop for external users. According to Microsoft Docs...
2022-07-06 (first published: 2022-06-22)
283 reads
Time to shift gears away from the world of relational databases whether that is in the cloud, on-prem, Linux-based, containers or even sitting within Kubernetes. Everyone has heard of...
2022-07-06
180 reads
Resumes have been on my mind a lot recently. I’ve been thinking that I wish I’d kept mine up to ... Continue reading
2022-07-06 (first published: 2022-07-05)
35 reads
Over the past couple of years, I’ve developed several tools that I’ve been using during my Performance Tuning and other related assignments. I thought to share it with the...
2022-07-06 (first published: 2022-07-04)
104 reads
I don’t think I’m going too far out on a limb to call Kevin Kline a friend. I’m extremely humbled and honored that I can say that. Kevin is...
2022-07-06
20 reads
This procedure can get you the list of queries being executed frequently and for duration greater/less than a particular time. You may also find it very useful if you...
2022-07-06
52 reads
This procedure will get all the objects performing committed reads. It will fetch all the objects (Procedures, Functions, Triggers, View etc.) that doesn't uses the NOLOCK and SET ISOLATION...
2022-07-06
49 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp: 0817839777 Kw. Industri Pulogadung, Jl. Raya Bekasi Km. 21, Ruko No.A2/18-19, RW.3, Wil,...
WhatsApp: 0817839777 Jl. I Gusti Ngurah Rai No.8 A-B, RT.8/RW.6, Wil, Kec. Duren Sawit,...
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