The Curse of Relational Databases
Let’s face it, none of Information Technology is easy. Oh yeah, there are those few geniuses that have an absolute...
2014-06-23 (first published: 2014-06-18)
5,175 reads
Let’s face it, none of Information Technology is easy. Oh yeah, there are those few geniuses that have an absolute...
2014-06-23 (first published: 2014-06-18)
5,175 reads
I’ve been exploring how natively compiled procedures are portrayed within execution plans. There have been two previous posts on the...
2014-06-17
1,358 reads
All the wonderful functionality that in-memory tables and natively compiled procedures provide in SQL Server 2014 is pretty cool. But,...
2014-06-13 (first published: 2014-06-10)
2,060 reads
It’s not like I can’t find plenty of great presentations here in the US, but, while I was over in...
2014-06-06
751 reads
The combination of in-memory tables and natively compiled procedures in SQL Server 2014 makes for some seriously screaming fast performance....
2014-06-05
1,362 reads
How do you add an instance to your local SQL Server installation? You run the executable that you probably downloaded...
2014-05-19 (first published: 2014-05-13)
1,489 reads
I’m going to speak at three user groups in three days in North and South Carolina. Evidently this is known...
2014-05-09
494 reads
Whoa! Another month gone by already? I guess I better pick a speaker of the month then. I went to...
2014-05-02
1,196 reads
I introduced Azure Automation in a previous post. I’ve spent some more time exploring it.
There’s a set of documentation available...
2014-04-23
1,379 reads
That is a patently false statement and total BS. It sure does crawl up your spine though doesn’t it? Why...
2014-04-22
933 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