Sic Transit Gloria Community
When Covid took out the PASS organization, I had someone say to me, “Well, that’s the end of the data community.” My response was pretty simple, “Nope. The community...
2025-03-20
18 reads
When Covid took out the PASS organization, I had someone say to me, “Well, that’s the end of the data community.” My response was pretty simple, “Nope. The community...
2025-03-20
18 reads
This was an interesting thing I saw in a Question of the Day submission. I hadn’t thought about the issue, but apparently DATEADD truncates values rather than rounding them....
2025-03-19
144 reads
Learn how to deploy schema changes in an always-online SQL Server environment without a maintenance window. This utility reduces blocking and improves deployment success.
The problem
I attempted to deploy a...
2025-03-19 (first published: 2025-03-07)
208 reads
We get it. There’s no budget for a DBA on staff, or even a contract support firm like Dallas DBAs. You are not alone! There are thousands of firms...
2025-03-19 (first published: 2025-03-07)
610 reads
Don’t Panic! It’s a vague but common complaint, frequently with no additional details. Before blindly restarting SQL Server, let’s walk through quick checks that don’t require deep DBA skills....
2025-03-19
267 reads
I thought I didn’t care about linting, and lately, I haven’t written a lot of SQL, but for the SQL I do write, I have SQLFluff to help me...
2025-03-18
306 reads
I had someone reach out about generate_series() recently, saying they hadn’t realized this was a new feature in SQL Server 2022. They were wondering if it was better than...
2025-03-17 (first published: 2025-03-05)
380 reads
If you're a data analyst drowning in Excel, you know the pain. Endless filtering, formula nightmares, and the dreaded "file not responding" message. Excel's great for small stuff, but...
2025-03-17
289 reads
I’ve been working with SQL Server for a very long time. Out of the box, SQL Server works great, however there is regular care and feeding that needs to...
2025-03-17
19 reads
I recently took and passed the DP-700 exam, which is required for the Microsoft Certified: Fabric Data Engineer Associate certification. It’s the second Fabric certification, and it focuses more...
2025-03-17 (first published: 2025-03-05)
1,052 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