No Caps for SQL Saturday : Speaker Edition
A few weeks back, I got into a conversation about whether PASS should put the boot down on events and...
2012-05-17
1,006 reads
A few weeks back, I got into a conversation about whether PASS should put the boot down on events and...
2012-05-17
1,006 reads
This month, Chris Shaw (Blog | @sqlshaw) is leading the charge on the T-SQL Tuesday. This event is basically a blogging...
2012-05-08
1,001 reads
They say, “April showers bring May flowers.” But what if it doesn’t bring May flowers? What if instead you get...
2012-05-08
841 reads
She Can Dig It!
A while back I was asked, if you can use the plan cache to determine which plans...
2012-05-04
1,444 reads
If you’ve been following this blog for a while, you have probably noticed that the content here has been a...
2012-05-03
712 reads
Ever wanted to hang out and talk about SQL Server over lunch? Maybe get a chance to ask those questions...
2012-05-02
624 reads
Another month goes by and it’s time again to ask… are your SQL Servers healthy? Have they been properly configured? ...
2012-04-12
892 reads
Is SQLCLR good or evil? Thomas LaRock (Blog | @SQLRockstar) is asking that question this month in his #MemeMonday blog party.
Let’s...
2012-04-10
1,135 reads
Before the advent of the modern “Social Network”, many of us were already connected through tools that had much less...
2012-04-09
828 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-03-30
1,875 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