PASSMN May Meeting
If you are going to be visiting Minnesota on May 17th or are there on more permanent basis, you can...
2011-05-09
637 reads
If you are going to be visiting Minnesota on May 17th or are there on more permanent basis, you can...
2011-05-09
637 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-05-06
567 reads
SQLRally is a week away. Are you ready? It’s going to be a good time to learn and freshen up...
2011-05-04
489 reads
Earlier today, Thomas LaRock (Blog | @SQLRockstar) tagged me for his Meme Monday post. The question for today is: how many...
2011-05-02
572 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-04-29
1,463 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-04-22
575 reads
I’ve been counting down the days until I get the score from my second attempt at the SQL Server MCM...
2011-04-19
508 reads
I mentioned the April PASSMN meeting the other day… well now that meeting is tomorrow. Take a chance to invest...
2011-04-18
581 reads
As I mentioned in the introductory post, I’m summarizing posts from previous years in the the past week. Some posts...
2011-04-15
581 reads
Over the last couple months, I’ve been trying to figure out what to do with some of my old posts. ...
2011-04-14
455 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