Confusion of An Old Technologist
As someone who still actively pursues a career in technology, I’m a little on the older side. I got started...
2017-02-23
410 reads
As someone who still actively pursues a career in technology, I’m a little on the older side. I got started...
2017-02-23
410 reads
One question constantly comes up; What should the Cost Threshold for Parallelism be? The default value of 5 is pretty...
2017-02-22 (first published: 2017-02-20)
2,490 reads
I was asked if there was an easy way to export all the plans from cache to a .SQLPLAN file....
2017-02-13
863 reads
I love the questions I get while I’m presenting because they force me to think and learn. The question in...
2017-02-14 (first published: 2017-02-07)
1,506 reads
So, my blog got hacked. They edited the page where I thanked Rodney for all that he did. I had...
2017-02-06
439 reads
I’m working on securing the blog. Please stand by. Apologies for any inconvenience or confusion.
The post I have been hacked...
2017-02-05
598 reads
If you look at the Properties for the first operator of a graphical execution plan, you get all sorts of great...
2017-01-23
530 reads
The power and capabilities of Azure SQL Data Warehouse are pretty amazing. However, it’s still basically SQL Server under the...
2017-01-25 (first published: 2017-01-18)
1,109 reads
Data Definition Language queries don’t go through the optimizer, right? While normally, my short answer to this question in the past would...
2017-01-10
596 reads
It’s amazing just how much the landscape changed with the release of SQL Server 2016 SP1. For example, I just...
2016-12-20
464 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