SQL Server Engineering in Austin
I was lucky enough to attend SQL Saturday Austin 2025 a little over a week ago in conjunction with some work at the Redgate office. The opening keynote at...
2025-05-19 (first published: 2025-05-12)
959 reads
I was lucky enough to attend SQL Saturday Austin 2025 a little over a week ago in conjunction with some work at the Redgate office. The opening keynote at...
2025-05-19 (first published: 2025-05-12)
959 reads
pg_cron is a simple cron-based job scheduler for PostgreSQL that runs inside the database as an extension. It allows you to schedule PostgreSQL commands directly from your database, similar...
2025-05-19 (first published: 2025-04-24)
387 reads
On May 8, 2025, we hosted our first official event in Switzerland at Prime Tower, Zurich. The gathering marked an important step in our journey to support organizations as...
2025-05-16 (first published: 2025-05-15)
33 reads
In the blog post Call a Fabric REST API from Azure Data Factory I explained how you can call a Fabric REST API endpoint from Azure Data Factory (or...
2025-05-16 (first published: 2025-04-28)
905 reads
Many organizations list customer testimonials and quotes on their websites or literature. It makes sense to show off those places where you’ve done well in hopes of influencing others...
2025-05-16 (first published: 2025-04-25)
402 reads
One of our mission statements in the Book of Redgate says: attempt to do the best work of your life. I’d like to think that at most points in...
2025-05-16
90 reads
Tomorrow is the Redgate DevOps Day in Atlanta. You can still sign up, so do that if you can make it. Here’s the rough outline Vision Session – w/...
2025-05-14
18 reads
I have recently had the privilege of working with multiple clients who have been taking advantage of Change Data Capture “CDC”. Change Data Capture is a feature that utilizes...
2025-05-14 (first published: 2025-04-28)
692 reads
This is one of those blog posts you write so that 2 years later, you can look it up to remind yourself how to do something.
I found myself needing...
2025-05-14 (first published: 2025-04-28)
441 reads
It’s that time of the month again, when the T-SQL Tuesday blog party takes place. I manage this site, and am looking for hosts all the time. This month...
2025-05-13
35 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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