SQLSaturday Madison – April 7-8
The first event I ever spoke at was SQLSaturday in Madison, Wisconsin, back in 2012. I was petrified – would anyone...
2017-03-28
386 reads
The first event I ever spoke at was SQLSaturday in Madison, Wisconsin, back in 2012. I was petrified – would anyone...
2017-03-28
386 reads
PASS is our community.
It may sound a little cliche in this time of election propaganda in the US, but it’s...
2016-09-28
716 reads
You’ll probably hear about this from other sources, but an announcement made this morning bears repeating: One of my favorite...
2016-09-16 (first published: 2016-09-09)
2,715 reads
Which of these is more secure?
shilmar / Pixabay
Nicolas Chadeville / 500pxIt’s a trick question – the correct answer is “neither”.
Both castles and vaults...
2016-09-07
430 reads
This weekend, I attended SQLSaturday in Indianapolis for the first time. It’s one of the larger events in the Midwest...
2016-08-15
467 reads
The PASS Security virtual chapter hosted a great webinar on Thursday. Amit Banerjee from Microsoft’s SQL Server Tiger Team (b|t)...
2016-07-02
886 reads
I’m excited to announce that I have been selected to speak at PASS Summit again this year! I’ll be presenting...
2016-06-23
344 reads
If you’re within driving distance of Iowa City, IA, I’d love to see you at SQLSaturday Iowa City this weekend!...
2016-06-06
434 reads
Q: True or False – Iowa has one of the world’s longest-running SQL Server conferences?
A: True! SQLSaturday #19 was held in the fall of...
2016-01-28
1,011 reads
I’m happy to announce that my first public session of 2016 will be at SQLSaturday Chicago on March 5! I...
2016-01-26
430 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