Balancing Priorities
This one isn't a technical post, but it's entirely appropriate to those of us in the IT field. Today was a...
2009-06-02
775 reads
This one isn't a technical post, but it's entirely appropriate to those of us in the IT field. Today was a...
2009-06-02
775 reads
The USB not in Hyper-V thing is annoying. It actually made me stop and consider my alternatives for a desktop....
2009-06-02
773 reads
I flew up to Birmingham Friday for SQLSaturday #7 organized by John Baldwin from Steel City SQL and a lot...
2009-06-01
712 reads
Ken Starnes from the Portland group will be having their first event on June 6th. I like the way they've...
2009-06-01
298 reads
When it comes to securing a system, it's important to understand how it might be attacked. That's what surface area...
2009-06-01
1,326 reads
A hash is a computation that transforms one set of data into another (hopefully smaller) set of data. So a...
2009-06-01
5,248 reads
For those who are interested, I've got a couple of speaking engagements coming up in the next two weeks. I'll be speaking...
2009-06-01
615 reads
An interesting problem develops when the standard default collation for SQL Server isn't appropriate. Working with clients here in the...
2009-05-29
1,616 reads
It doesn’t happen often but every once in a while you may be the lucky person to find a previously...
2009-05-29
2,157 reads
My company has taken the plunge and we have two of the Duo 640’s coming. As soon as they get...
2009-05-29
1,533 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