Sort – Is it Really a Blocking Iterator?
SQL Server has two types of execution plan iterators: Blocking and Non-Blocking.
A non-blocking iterator gets rows in and sends rows...
2014-10-30
1,323 reads
SQL Server has two types of execution plan iterators: Blocking and Non-Blocking.
A non-blocking iterator gets rows in and sends rows...
2014-10-30
1,323 reads
Were you ever in a situation where you ran a query, it ran for a long time and you didn’t...
2014-10-06 (first published: 2014-10-01)
7,562 reads
When you set up a multi-subnet cluster, whether it’s a Failover Cluster Instance or an Availability Group, you need to...
2014-09-29
970 reads
Last month, I had the pleasure of presenting two of my favorite sessions at the SQLBits conference in Telford, UK.
A few days...
2014-08-28
1,041 reads
About a year and a half ago, I approached Guy and asked him if he wanted to start a podcast...
2014-08-14
1,406 reads
If you’re reading this, you probably think, like me, that SQL Server is an awesome product. One of the great...
2014-08-11
1,390 reads
On Saturday, I had the pleasure to present my session, “Things You Can Find in the Plan Cache”, at SQLBits!
Thanks to...
2014-07-19
451 reads
About two months ago, after two and a half years, I left Microsoft.
Microsoft is an amazing place to work for. It’s...
2014-07-17
479 reads
About two months ago, after 2.5 years, I left Microsoft.
Microsoft is an amazing place to work for. It’s conformable, balanced,...
2014-07-17
560 reads
It’s T-SQL Tuesday time, and this month’s host, Boris Hristov (blog|twitter) chose the topic of interviews.
Over the time as a...
2014-05-13
721 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