Daily Coping 12 Aug 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-08-12
12 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-08-12
12 reads
One of our clients in Vietnam, his name is Son Vu, who is developing a website running on VPS (his homepage trainghiemmuasam.com) encountered an error that MySQL could not...
2022-08-12 (first published: 2022-08-01)
182 reads
Ah, Tim Ford. I remember the time we were sitting at Ruth Kriss Steakhouse trying to figure out which of the two of us was the dumbest person in...
2022-08-12 (first published: 2022-07-26)
246 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-08-11
13 reads
Foreword
A picture is worth a thousand words. I use screenshots daily, whether it’s to share results, how-to tutorials, point out mistakes or create memes.
None of the tools I’ve tried...
2022-08-11
53 reads
Thanks to everyone that attended my sessions today at VS Live. I have my slides and code available for download at the VS Live site and here. The Serverless...
2022-08-11
27 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-08-10
17 reads
If you have excel data, or user-entered data, you have likely experienced frustration from repeatedly seeing the error message below upon hitting “Close & Apply” or refreshing your data...
2022-08-10 (first published: 2022-07-19)
249 reads
I mentioned in my New Database Job – The 90 Day Plan blog how I have a trick for storing index usage stats up until close to the next reboot...
2022-08-10 (first published: 2022-07-19)
445 reads
T-SQL Tuesday is a monthly blog party hosted by a different community member each month, and this month Kevin Kline (blog | twitter) asks us to talk about an...
2022-08-10
16 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