Sizing your Azure SQL Database
Do you want to identify the correct Service Tier and Compute Size ( was once known as performance level) for your...
2019-03-20
666 reads
Do you want to identify the correct Service Tier and Compute Size ( was once known as performance level) for your...
2019-03-20
666 reads
Another re-post of a video from last year, this time showing you an in-built protection of setting max server memory...
2019-03-14
494 reads
A quick video clip showing how to create a deadlock in SQL Server and find information about it.
2019-03-13
1,121 reads
It has been a while since I have participated in a T-SQL Tuesday but I felt the urge to do...
2019-03-12
439 reads
I personally think that query store has been a fantastic feature. I find myself using it for query performance troubleshooting...
2019-03-05
622 reads
You cannot enable trace flags (globally or by session) within Azure SQL Database but did you know that some global...
2019-02-26
612 reads
As Microsoft states “online clustered columnstore index build enables you to optimize and compress your data with minimal downtime without...
2019-02-21
183 reads
Checking out the transaction log in Azure SQL Database. If you are curious like me, you will want to know...
2019-02-13
187 reads
Have you ever wanted to capture the T-SQL, waits, sessions IDs (etc) at a specific time for Azure SQL Database?...
2019-02-06
224 reads
I seem to be writing solely about Azure so to shake things up a bit I am going back to...
2019-02-05
185 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