Daily Coping 6 Jul 2022
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 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
This procedure will get all the stored procedures and triggers missing the use of SET NOCOUNT ON. It may be helpful in performance tuning assignments.
2022-07-06 (first published: 2022-07-04)
58 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