Webcast – Small Changes Can Make a World of Difference
This Thursday, 10AM GMT, I will be hosted by Dell’s Richard Douglas (blog|twitter) for a webcast. I will present my...
2014-03-18
450 reads
This Thursday, 10AM GMT, I will be hosted by Dell’s Richard Douglas (blog|twitter) for a webcast. I will present my...
2014-03-18
450 reads
Earlier this week, I delivered a presentation called “Query Progress Tracking in SQL Server” to my local user group.
Among other...
2014-03-05
614 reads
I don’t like the MERGE statement. The syntax is weird, it’s tricky in terms of locks, and it has a...
2014-02-20
4,404 reads
Here’s a newsflash: You may not thing so, but you are expensive. There’s no point in endless performance tuning. I love...
2014-01-28
711 reads
It’s 2014 now. I hope you had fun in new year’s eve.
2013 was an amazing and intense year. To recap...
2014-01-02
790 reads
This post is for T-SQL Tuesday #49, the monthly blog party of the community.
This tradition was started by Adam...
2013-12-10
1,439 reads
While in SQLRally Amsterdam, I had the honor to interview Brent Ozar (blog | twitter), Adam Machanic (blog | twitter) and Denny Cherry (blog | twitter)...
2013-12-09
543 reads
The past week I had the pleasure to attend SQLRally Amsterdam.
I took a flight from Tel-Aviv to Amsterdam and got...
2013-11-11
778 reads
Resource Governor was introduced in SQL Server 2008 in order to allow us have better control over our system resource...
2013-10-09
2,244 reads
Whether you’re just starting out or already a few years in the game, you’re probably wondering how you can become...
2013-08-30 (first published: 2013-08-26)
3,833 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