Using a GenAI to Help Brent
Brent had a query exercise recently about train stations moving in some order and having overrides to this order in emergencies. I suppose he’s been traveling a lot lately...
2025-06-27
24 reads
Brent had a query exercise recently about train stations moving in some order and having overrides to this order in emergencies. I suppose he’s been traveling a lot lately...
2025-06-27
24 reads
When I watched the following video from Justin Sung, I realized that I am often guilty of the two problems he cites with regards to making my schedule work...
2025-06-26
35 reads
I’m excited to share a new open-source project I’ve been working on that combines two of my favorite areas: SQL Server and Pure Storage FlashArray performance monitoring. If you’ve...
2025-06-26
37 reads
When you create linked services in Azure Data Factory (ADF) or in a Synapse Workspace, you typically want to parameterize certain properties of the connection. When you deploy your...
2025-06-26
67 reads
What is Concurrency in Databases? Concurrency control ensures that multiple transactions can occur simultaneously without leading to data inconsistency. Two popular concurrency control mechanisms are: MVCC in PostgreSQL PostgreSQL...
2025-06-25 (first published: 2025-06-11)
400 reads
After spending decades working in SQL Server, getting familiar with PostgreSQL felt like traveling to a country where everyone speaks a language I mostly understand – but with a different accent...
2025-06-25 (first published: 2025-06-11)
769 reads
Instead of teaching the CISA exam prep course, I'm teaching in the IT track. With Artificial Intelligence (AI) being a central focus in most audit and security tracks, I'm...
2025-06-25
16 reads
📘 Understanding PESTLE PESTLE is a strategic framework used to evaluate external macro-environmental factors that influence business operations. It stands for This model is particularly useful for assessing how...
2025-06-24
22 reads
Configuration, Performance, and Unnecessary Usage TempDB is the SQL Server equivalent of a junk drawer – everyone uses it, nobody monitors it, and eventually it becomes a bottleneck you...
2025-06-23 (first published: 2025-06-04)
834 reads
I have a proper blog post coming out tomorrow for T-SQL Tuesday, but today, celebrate with me that SSMS 21 finally, at long last, fixes the irritating fact that...
2025-06-23 (first published: 2025-06-09)
1,031 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