Something About Nothing: NULL
You wouldn’t think that “nothing” would cause so many problems. But seriously, understanding how to correctly use NULLs is a...
2005-10-16
1,385 reads
You wouldn’t think that “nothing” would cause so many problems. But seriously, understanding how to correctly use NULLs is a...
2005-10-16
1,385 reads
Why is that? My Database Daily editorial for this week focuses on that and I thought it would be interesting...
2005-10-14
1,386 reads
We typically have great weather in Colorado where I live, but we do get
snow. And occassionally it causes issues. Like...
2005-10-12
1,522 reads
I know, I need some stuff posted about PASS and I'll get to it. My wife
was injured (she's ok) while...
2005-10-09
1,413 reads
Aunt Kathi knows many of you do things you know are wrong, like rolling through stop signs, littering, and using the sa...
2005-10-04
1,304 reads
So far my posts have been non-technical musings about my life outside of work. I guess it is time to...
2005-10-03
1,245 reads
The past week at PASS was more informative and fun than I could ever have imagined. By getting involved in the...
2005-10-01
1,288 reads
Day Four wrapped up SQL Pass 2005. As a first time attendee to this event, my head was swimming by...
2005-10-01
1,373 reads
Day Three of PASS had a decidedly better start than did the previous day. After finally figuring out the effective...
2005-09-29
1,310 reads
This year, I have the opportunity to attend the SQL PASS event in Grapevine, Texas. This is my first PASS...
2005-09-28
1,422 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