2009-07-15
647 reads
2009-07-15
647 reads
After reading several pages of comments on this posting, I'm taking a stab at helping Canadian Unity on my beloved...
2009-07-14
3,725 reads
I ran across this post about time to move beyond 960 where it talks about most websites today are designed...
2009-07-14
371 reads
Chad Miller will be doing a presentation on Powershell and we’ll have our usually round table discussion afterward – often the...
2009-07-14
467 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
Cross posted from the SQLSaturday blog
Though few see it, we also maintain a full set of admin tools for the...
2009-07-14
538 reads
Potentially it can overwhelm the bus, at least that's what this ZDNet review of the Fusion IO SSD drives says....
2009-07-14
1,748 reads
I read a post on Brent Ozar’s blog last week that discussed employers’ expectations when hiring new team members. Though...
2009-07-13
605 reads
This is part 3 of my 29 part series called Better Know A SSIS Transform. Hopefully you will find the series...
2009-07-13
3,986 reads
Hey, Orlando area SQL Server folks, don’t forget the OPASS meeting 6pmTuesday, July 14th at End to End Training (map). ...
2009-07-13
446 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