SQL MVP Profile of the Week - Michael Coles
As we continue to get ready for the NY\NJ SQLSaturday User Group meeting this October 24, 2009, I had the...
2009-10-15
1,161 reads
As we continue to get ready for the NY\NJ SQLSaturday User Group meeting this October 24, 2009, I had the...
2009-10-15
1,161 reads
NJSQL/NYCSQL Saturday Event on October, 24th (Registration Required)
Here are the details, of my previously announced SQL Saturday event hosted by...
2009-10-05
1,269 reads
Hi, ALL. Sorry I've been light on content this week. I've been battling a cold, and working on some excellent...
2009-10-02
468 reads
OK, there was something that Microsoft did to tick me off. SQL Server 2005 introduced us to so many exciting...
2009-09-28
6,198 reads
As an official ‘Friend of Red Gate’ , I occassionally get direct updates and announcements from the company. They have an...
2009-09-24
944 reads
It’s time for the MVP Profile of the Week!
You’ve probably seen his work, as he’s been busy producing content for...
2009-09-23
1,403 reads
Hi, all! Hope everyone had a great weekend!
I was preparing my Blog for today on a subject I believe...
2009-09-21
479 reads
Everyone remembers that in 32-bit windows architecture, in order for SQL Server (2005) to address more than 4GB of memory, one...
2009-09-21
899 reads
Always On: SQL Server High Availabilty
Just wanted to tell you all about a fantastic Webinar on SQL Server High Availability,...
2009-09-18
946 reads
It’s been a busy month of September, and I’ve been getting feedback from the busy world of SQL Server MVP’s...
2009-09-16
1,707 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