2024-11-22
477 reads
2024-11-22
477 reads
2024-11-21 (first published: 2024-11-20)
525 reads
There is no shortage of mundane tasks at work. Steve Jones notes that you might not want to depend on those to fill your day in the future.
2024-11-20 (first published: 2015-05-18)
458 reads
I am off to Live 360 today, on my last trip of the year. I’m excited to deliver two presentations tomorrow (VSTH03 and VSTH12), but a little sad this...
2024-11-20
18 reads
It’s been an amazing week here, as well as a long week. I’m tired, as are many others. The blogging table is a little bare this am, but I...
2024-11-20 (first published: 2024-11-08)
160 reads
I missed blogging yesterday as I was on stage/backstage for quite a bit of the keynote. Live updates, so keep refreshing. Today I’m blogging and noting the interesting things...
2024-11-18 (first published: 2024-11-07)
165 reads
The challenges of managing lots of system are significant and there aren't easy solutions, but Steve has a few thoughts on what you can do.
2024-11-18
263 reads
2024-11-18
566 reads
ochisia – n. the fear that the role you once occupied in someone’s life could be refilled without a second thought, which makes you wish that every breakup would...
2024-11-15
18 reads
I looked at row_number() in a previous post. Now I want to build on that and do some counting of rows with COUNT() and the OVER clause. I’ll show...
2024-11-15 (first published: 2024-10-30)
475 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