Re-blog – March 16 – March 22
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-03-23
786 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-03-23
786 reads
Are you ready for the round-up of last week’s #meme15 Facebook question?
In total, there were eight participants in this month’s...
2012-03-22
1,016 reads
It’s the early morning of the 16th, and time to write my #meme15 post. Remember, these are due on or...
2012-03-16
861 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-03-16
703 reads
What was the number one question from today’s webcast on wait statistics? Where can the slides and sample code be...
2012-03-15
743 reads
Here’s wishing you a Happy Pi Day…
If my picture isn’t good enough, here’s a better representation of pi.
3.14159265358979323846264338327950288419716939937510
Related posts:Happy Pi...
2012-03-14
585 reads
Last weekend, I braved to last hurrah of our Minnesota winter and jumped into Lake Calhoun in Minneapolis. It was...
2012-03-11
770 reads
This month, the #meme15 post will fall on March 15th, often referred to as the Ides of March. This date...
2012-03-11
655 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-03-09
617 reads
Are your SQL Servers healthy? If the things went south today today, would you be able to say you can...
2012-03-08
1,772 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