Replication Snapshot Errors Caused By Compatibility Level Setting
I ran across an interesting replication error recently that's worth sharing. It happened while using a distributor running SQL 2008,...
2009-07-22
457 reads
I ran across an interesting replication error recently that's worth sharing. It happened while using a distributor running SQL 2008,...
2009-07-22
457 reads
Chris Shaw posts SQL quiz #4, I make an observation on Twitter about who gets tagged, Brent Ozar tags me...
2009-07-14
711 reads
Note: I'm writing this as part of the "Best Thing I Learned At PASS" contest. Why? Because if I win...
2009-07-01
755 reads
Last Friday I got the official notice that I've been selected to present a community session at the 2009 PASS...
2009-06-15
470 reads
Just a quick note to mention that I'm speaking at the next Space Coast SQL Users Group on Thursday, June...
2009-06-09
425 reads
I spent the last 4 days in Denver helping my company move in a new datacenter and while I was...
2009-05-20
576 reads
Note: I intended to post this last week but life\work\burnout and installing Windows 7 RC got in the way.
Another weekend,...
2009-05-12
435 reads
I had a great time at SQL Saturday Atlanta last weekend. I drove from Orlando to Atlanta on Friday with...
2009-04-29
1,530 reads
It's official – I've submitted my abstracts for the 2009 PASS Summit and received my confirmation. Now I wait to see...
2009-04-24
668 reads
In yesterday's post about using SQL 2008 Express as a Central Management Server I mentioned that you can't register a...
2009-04-21
552 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