What a day to start Blogging
I have been thinking of writting a blog for the past 6 months but never had time or could I...
2009-01-13
433 reads
I have been thinking of writting a blog for the past 6 months but never had time or could I...
2009-01-13
433 reads
I'm a technology guy, but one lesson I've learned is that not all solutions can be solved by throwing technology...
2009-01-12
717 reads
When I was in graduate school I wanted an internship for the summer to get some experience and get ready...
2009-01-12
759 reads
I've mentioned before that I was on Twitter and I know that for some the question is still out on...
2009-01-12
916 reads
I decided to attend to see how the group was doing and learn a little more about Dot Net Nuke...
2009-01-11
629 reads
I don’t do resolutions - they’re cliché, overdone, and rarely stick. However, I’m a believer in setting goals and periodic progress...
2009-01-09
1,043 reads
This came up on Twitter today. I have a search set for "SQL Server" and it pulled up someone who...
2009-01-09
946 reads
I grew up watching the syndicated version of Star Trek every evening as a kid, 12-14 and dreamed of being...
2009-01-09
732 reads
Looks like the Windows 7 beta download has been delayed while Microsoft adds additional infrastructure support. A little disappointing but I...
2009-01-09
634 reads
First saw this because Jason Massietwittered about it. But apparently there are enough bits of the .NET Framework in R2...
2009-01-09
1,265 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