SQLSaturday, Rocky, and a CheeseSteak - Upcoming Event
As you know, the SQLSaturday sensation has exploded all over the nation. So many events scheduled this year, there is...
2011-01-31
2,107 reads
As you know, the SQLSaturday sensation has exploded all over the nation. So many events scheduled this year, there is...
2011-01-31
2,107 reads
Microsoft SQL Server Licensing For Dummies..
Don’t let the above title fool you! Have you been confused on the Microsoft...
2011-01-24
89,555 reads
What the heck is going on? Industry news, shake-ups and departures.
It's only two weeks into the New Year 2011, but there's...
2011-01-12
1,740 reads
Get Prepared for the January Hiring Season
As the year winds down, in what was undoubtedly a tough economic year for...
2010-12-21
761 reads
Just in time for Christmas, Microsoft releases SQL Server 2005 SP4.
Many were wondering if they would meet their intended...
2010-12-18
1,751 reads
There are many considerations and much preparation to do, when a company decides that it is ready to upgrade their...
2010-12-13
13,791 reads
Signal Waits vs. Resource Waits
During my presentation at SQLSaturday#59, I spoke about the categories of wait types, such as...
2010-12-06
3,713 reads
Signal Waits vs. Resource Waits
During my presentation at SQLSaturday#59, I spoke about the categories of wait types, such as...
2010-12-03
20,892 reads
SQLSaturday#59 – Waits & Queues Presentation
At SQLSaturday#59 in NYC, my session was about Waits & Queues. I presented a topic I thought was...
2010-11-24
940 reads
As I was doing a little research this evening for a client, I hit the SQLMag site for the latest updates. ...
2010-11-22
650 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