What's New is SSIS 2012? - Find out with Andy Leonard at the NJ SQL User Group - tonight!
As us SQL professional folks know, since the advent of SQL Server Integration Services, affectionately known as SSIS, it has...
2012-02-21
2,616 reads
As us SQL professional folks know, since the advent of SQL Server Integration Services, affectionately known as SSIS, it has...
2012-02-21
2,616 reads
Hi, all! It's been a while, since I posted a blog entry, and is directly related to today's Meme Monday...
2012-02-06
1,901 reads
Staying true to the meaning of SQL Community with respect to local chapters and user groups, I wanted to bring you...
2012-01-20
1,574 reads
Everybody deserves a second chance in love, life, and in TSQL as well! Now that it's the beginning of a New...
2012-01-10
5,155 reads
Yes, it's Monday again, and not only that - it's another edition of Meme Monday (the first of 2012), started by...
2012-01-09
1,355 reads
It was a day of warm weather, it was a day of cold weather. A tale of two cities on...
2012-01-06
2,054 reads
ISOWEEK 52 Weeks in the Year
Stardate 12:20:2011 Week 51 SSC.Com Web Blog, Planet Earth. With only approximately two weeks left...
2012-01-06 (first published: 2011-12-20)
15,227 reads
Holiday Greetings to all you DBA's and SQL Server professionals! This blog goes out to all of you who are on-call...
2011-12-26
2,276 reads
Indeed the Holiday Season is traditionally a season of giving, and being charitable to those who are less fortunate. Although giving...
2011-12-23
1,681 reads
SQL Server Magazine Reveals New Name for the Brand
Did you hear the news? SQL Server Magazine has a new...
2011-11-30
7,485 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