SQL Server 2017 – Interleaved Execution
I worked on testing interleaved execution with Microsoft back in January, I didn’t do much, just tested the functionality against...
2017-11-20 (first published: 2017-11-09)
856 reads
I worked on testing interleaved execution with Microsoft back in January, I didn’t do much, just tested the functionality against...
2017-11-20 (first published: 2017-11-09)
856 reads
It’s good to be proactive and one way is to setup alerts and it is no different when using Azure...
2017-11-16
510 reads
TSQL Tuesday time hosted by Ewald (https://sqlonice.com/tsql-tuesday-96-folks-who-have-made-a-difference/) and quite simply one man has morphed me into who I am today...
2017-11-14
317 reads
With Halloween around the corner what better topic to discuss than phantom reads. A phantom read occurs when rows have...
2017-11-08 (first published: 2017-10-26)
1,615 reads
Let’s start off with a quick overview of SQL Server versions and compatibility levels.
100 = SQL Server 2008 and Azure SQL...
2017-11-06
523 reads
What? Is probably the most common reply out there and if it is then that is how I felt when...
2017-11-02
414 reads
I love the query store, it is powerful (can be dangerous) , easy to use and packed full of information. I...
2017-11-02 (first published: 2017-10-24)
2,065 reads
I used to be on the fence regarding whether or not Automatic Tuning should be on as the default when...
2017-11-01
379 reads
So I had a corruption issue and I was thinking about running repair but I wanted to know what would...
2017-10-24 (first published: 2017-10-16)
2,076 reads
I have written about Azure SQL Database LEVEL firewall rules before during my blog series, more specifically the security blog...
2017-10-20 (first published: 2017-10-11)
1,709 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