Classify your Azure SQL Database
Here I am talking about SQL Data Discovery & Classification feature that is built into Azure SQL Database. With this feature you...
2019-02-04
191 reads
Here I am talking about SQL Data Discovery & Classification feature that is built into Azure SQL Database. With this feature you...
2019-02-04
191 reads
I do not usually link straight to other blog posts or technical papers but I really had to with this...
2019-01-24
306 reads
Checking out the transaction log in Azure SQL Database. If you are curious like me, you will want to know...
2019-01-23
1,627 reads
Getting straight to the point, I initiated a very common task recently, another scale up request. However, a new message...
2019-01-21
234 reads
You will very likely know that SQL Server 2008 / R2 end of support is on July 9th 2019. Not that...
2019-01-15
255 reads
Being the start of the new year and with new projects most likely starting again I would like to share...
2019-01-07
317 reads
Once again I would like to share with you an article I wrote about backing up (and restoring) a SQL...
2019-01-01 (first published: 2018-12-19)
2,746 reads
I wrote a guest article for an IT consultancy on Azure SQL Database, more specifically DTUs and vCore options. At...
2018-12-17
874 reads
Sometimes I like to see and know what SQL server is doing under certain operations and recently I wrote an...
2018-12-11
228 reads
I would like to share a link to my Azure SQL Database Stairway series hosted over at SQLServerCentral. As stated...
2018-12-06
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