Replication Scripts: Show All Transactional Publications & Subscribers At Distributor
Anybody who has talked with me about replication or heard me present about it knows that I recommend using a...
2009-11-23
637 reads
Anybody who has talked with me about replication or heard me present about it knows that I recommend using a...
2009-11-23
637 reads
Sorry, I’ve been travelling for three weeks and, except for the posts around the PASS Summit, I’ve been blogging very...
2009-11-23
547 reads
PCLab.pl has an interesting review and benchmarks of a 3.07GHz Westmere-EP processor (which is the six-core, 32nm successor to the...
2009-11-23
986 reads
If you have a medium to large database in SQL Server, with lots of stored procedures, functions or views, it...
2009-11-23
510 reads
I can’t wait until Feb 27 when Code Camp is right in my backyard! I just submitted my session for...
2009-11-23
350 reads
My presentation and sample files from SQLSaturday in Orlando are now online for you to download. Check them out at...
2009-11-23
518 reads
Many times when I'm teaching a class or working with a group, they express frustration at the load time for...
2009-11-23
417 reads
Everyone likes to get a project done, but many times in our rush to deploy we bypass some of the...
2009-11-23
419 reads
I haven’t done a car update in some time, and I’d like to get back to them. Surprisingly quite a...
2009-11-23
723 reads
A common question I've been asked a lot lately is how to replace the icon in the Report Manager to...
2009-11-22
14,736 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