AdventureWorks2012 Bug on Azure
While I have production databases in Azure, I can’t exactly experiment with them at will. Further, while they mostly have...
2013-09-25
1,317 reads
While I have production databases in Azure, I can’t exactly experiment with them at will. Further, while they mostly have...
2013-09-25
1,317 reads
One of the things that can make Windows Azure SQL Databases (WASD) attractive is the fact that they run inside...
2013-09-24
771 reads
To put it bluntly, you need to go cast a vote for Allen Kinsel for the PASS Board.
In his own...
2013-09-23
949 reads
I’ve listened to tons of programmers and DBAs complain about the look of Windows Azure. But, I’m friends with several...
2013-09-20
628 reads
Red Gate is constantly experimenting with technology. Because of a long history working within the Microsoft space, a lot of...
2013-09-19
822 reads
I was presenting a session on how to read execution plans when I received a question: Do you have a...
2013-09-20 (first published: 2013-09-18)
3,328 reads
Writing books, even just a chapter, is not easy. Yet, people are desperate to do it for some reason. But,...
2013-09-17
843 reads
First thing, there are no bad operators, just bad parents, uh, I mean query writers, or database designers, or ORM...
2013-09-24 (first published: 2013-09-16)
3,578 reads
When I first saw this question I thought to myself, “Self. Don’t you think that’s comparing apples to hammers? Yes,...
2013-09-13
927 reads
Didn’t they just do this in the spring? Word is out that they’re expanding even more data centers. The cynical...
2013-09-12
678 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