Oh Look, A Horseless Carriage
Never forget, we’re making buggy whips. And everybody we know drives little buggies and they need our buggy whips. We’ve...
2015-01-28
1,081 reads
Never forget, we’re making buggy whips. And everybody we know drives little buggies and they need our buggy whips. We’ve...
2015-01-28
1,081 reads
Parents, you know that feeling you get after you’ve brought home that brand new baby (or in my case, babies) where...
2015-01-30 (first published: 2015-01-26)
6,353 reads
There’s an old joke that goes, “Doctor, doctor, it hurts when I do this.” While the person in question swings...
2015-01-19
774 reads
The one absolute promise I made about serving on the PASS Board is that I would let you know what...
2015-01-16
529 reads
There’s power in naming things. Supposedly some types of magic are even based on knowing the correct names for things....
2015-01-20 (first published: 2015-01-14)
8,482 reads
A while back I wrote about saying “Thank you” to people. Last night I was listening to NPR on my...
2015-01-09
692 reads
This is me on the last cruise
In just a few more weeks I’ll be setting sail on the first of...
2015-01-06
1,086 reads
I love it that my first post of the new year is going to be Speaker of the Month. I’m...
2015-01-02
428 reads
If you get an execution plan that looks like this:
I wouldn’t blame you for immediately thinking about query tuning. Especially...
2014-12-29 (first published: 2014-12-19)
6,158 reads
For the month of November I was at the PASS Summit and Live360, so I didn’t get to find new...
2014-12-08
552 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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
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