Featured Blogger: Tim Mitchell
I met Tim about a year and a half ago at SQLSaturday Jacksonville and from the start we hit it...
2009-12-02
280 reads
I met Tim about a year and a half ago at SQLSaturday Jacksonville and from the start we hit it...
2009-12-02
280 reads
Recently announced, Google Dashboard shows some but not quite all of the data that Google has accrued about you – a...
2009-12-01
1,124 reads
I’ve been using Win 7 on my dev machine for a few months now, and finally decided over the Thanksgiving...
2009-12-01
503 reads
On the Friday at the end of the Summit we had a 4 hour Board meeting, welcoming new board members...
2009-11-30
1,743 reads
I met Rob via email early this year as a volunteer helping with content for PASS, and I’ve been following...
2009-11-29
1,417 reads
Brian Moran (incoming Board member) did a nice interview with Kevin, worth reading, and some good stuff about areas where...
2009-11-29
1,385 reads
Ran across this list a while back, Jurgen posted his Top 200 Developer Blogs list and an OPML file of...
2009-11-29
1,400 reads
I’m fond of browsing the discount shelf at the bookstore, it’s another way to see books that I might otherwise...
2009-11-26
577 reads
I know Thanksgiving has some deeper meanings, but at one level it’s all about the food. Food is a good...
2009-11-25
609 reads
Earlier this week I posted Part 1 and Part 2, today I want to wrap up by thinking about how...
2009-11-24
567 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