How to Tell Your Windows Azure SQL Database Moved
The very concept of the Windows Azure SQL Database (WASD) is predicated on the up-time created by having three active copies...
2013-05-13 (first published: 2013-05-07)
1,584 reads
The very concept of the Windows Azure SQL Database (WASD) is predicated on the up-time created by having three active copies...
2013-05-13 (first published: 2013-05-07)
1,584 reads
You can get backups of your WASD databases. But, if you want them to be transactionally consistent, you need to...
2013-04-04
924 reads
Microsoft has stated pretty clearly that they’re putting code on Azure first, ahead of the desktop. Which makes one wonder...
2013-03-27 (first published: 2013-03-25)
3,637 reads
Laws of Thermodynamics
TANSTAAFL
Gods of the Copybook Headings
All magic comes with a price
Winter Is Coming
My adult years started with a pretty...
2013-03-20
862 reads
GAAAAAAAHHHHH!!!!
I feel slightly better, but only slightly.
I started watching Star Trek: The Next Generation on Netflix just to unwind my...
2013-03-18
1,127 reads
The greatest part of my job is that I get to travel all over the world to present different technical...
2013-03-11
1,173 reads
I jumped at the opportunity to write a chapter for this book, Pro SQL Server 2012 Practices, because of all...
2013-03-04
1,702 reads
I earned my nickname. I’m proud of it. I am the Scary DBA. I don’t really like to advertise my...
2013-02-27
1,531 reads
In just a couple of weeks I’ll be flying down to Richmond, VA to speak at SQL Saturday #187. I’ll...
2013-02-25
887 reads
Want to start a fight between a bunch of DBAs or database developers? Ask them where the comma should be...
2013-02-18 (first published: 2013-02-13)
3,558 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