Challenge Accepted
There seemed to be some question whether my comfort level with my own masculinity would prevent me from wearing these:
Oh...
2014-07-23
706 reads
There seemed to be some question whether my comfort level with my own masculinity would prevent me from wearing these:
Oh...
2014-07-23
706 reads
I took part in the PASS Summit 2014 selection committee this year because I was really curious about seeing how...
2014-07-21
671 reads
I wouldn’t say it’s common knowledge that you should look at execution plans when tuning queries, but it’s not exactly...
2014-07-17 (first published: 2014-07-15)
10,306 reads
Another month another bunch of great presentations. I almost don’t want to do this any more. It’s hard. I sit...
2014-07-11
565 reads
Red Gate Software is running a campaign around coping with the worst day of a DBAs life. We’ve been posting...
2014-07-08
869 reads
Oh we are a bunch of high school kids at heart. Maybe high school never ends (and there’s a nightmare,...
2014-07-03
1,121 reads
Statistics are one of the single most important driving factors for the behavior of the query optimizer. The cardinality estimates...
2014-07-03 (first published: 2014-07-02)
2,204 reads
I no more than finished my rant from last week than I started thinking about all the reasons why a...
2014-06-30
1,641 reads
I know I tend to be overly passionate. It’s something that has gotten me into trouble in the past. It’s...
2014-06-26
857 reads
I’m actually having problems identifying the utility of execution plans when working with natively compiled procedures. Or, put another way,...
2014-06-30 (first published: 2014-06-25)
1,911 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