Un-SQL Friday: Branding?
Following in Midnight DBA’s more interesting half new blog fest topic.
My branding? I don’t have a clue. There, I said...
2010-11-19
667 reads
Following in Midnight DBA’s more interesting half new blog fest topic.
My branding? I don’t have a clue. There, I said...
2010-11-19
667 reads
Wouldn’t you like to know why the optimizer stopped tuning the execution plan you’re looking at? It’s actually possible and...
2010-11-18
3,052 reads
The new book is available in a free download from Red Gate. I had a lot of fun working on...
2010-11-16
1,169 reads
After all the conversations at FreeCon last week (more on that later, when I’ve assimilated it better), I finally decided...
2010-11-15
528 reads
Or, another way to put it, in most cases, shooting yourself in the foot.
I was not aware that the cumulative...
2010-11-15
2,892 reads
Microsoft has announced changes to the MCM program. This page shows all the ways that you can become an MCM...
2010-11-12
1,331 reads
Today is Dr. Dewitt.
The ballroom, where the keynotes are held, is filled with extra chairs. The Summit organizers expect extra...
2010-11-11
791 reads
Today is Kilt Day at the PASS Summit. We’re going to try to arrange a group photo at lunch time.
The...
2010-11-10
776 reads
Sitting at the big kids table at the PASS Summit, ready to rock and roll. The Summit has not officially...
2010-11-09
661 reads
Mark Souza from the SQL CAT Team, some of the smartest & most capable of MS consultants in SQL Server, is...
2010-11-09
716 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