SQLPeople INSPIRE NYC - Coming this FALL - November 12, 2011
Nature abhors a
vacuum. So, when I see so many SQL
Server happenings going on all over the country, and indeed the...
2011-08-15
1,839 reads
Nature abhors a
vacuum. So, when I see so many SQL
Server happenings going on all over the country, and indeed the...
2011-08-15
1,839 reads
T-SQL Tuesday #21 - A Day Late and Totally Full of It
Holy Crap! What in the world are we talking about...
2011-08-10
1,861 reads
We've seen the argument before, that working from home, actually increases productivity. This is one of the major cases in...
2011-08-01
2,549 reads
Quick update. This Thursday, July 28, 2011 at the NYC SQL Server User Group at Microsoft HQ in NYC, SQL MVP...
2011-07-26
1,462 reads
The SQLSaturday Sensation!
Congratulations, Brazil! You are the recipient host country for SQLSaturday #100!! On Saturday, November 26, 2011, when the...
2011-07-19
2,435 reads
If you're in the local NY/NJ Tri-State area, and planning on attending, this is a reminder from the New Jersey...
2011-07-18
691 reads
It's the beginning of the new work week, and as they say, it's Just Another Manic Monday....[Bangles].
I have a...
2011-07-18
1,117 reads
Next up, on the super SQLSaturday extravaganza, is SQLSaturday #80, in Wheeling, West Virginia! Wheeling, known as the friendly city,...
2011-07-12
1,003 reads
It’s time for July’s Meme Monday, and below is my entry, Star date 07:11:11. Started by Twitter|@SQLRockstar, Thomas LaRock, today’s...
2011-07-11
1,258 reads
Despite the title, this is a serious blog entry, dedicated to all you pet lover's out there. Although, I seek to...
2011-07-11
1,013 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