T-SQL Tuesday #179: The Detective’s Toolkit
It’s time for the monthly T-SQL Tuesday blog party. This month a longtime friend, Tim Mitchell is hosting and he’s got a neat invite. He’s asking us how to...
2024-10-08
48 reads
It’s time for the monthly T-SQL Tuesday blog party. This month a longtime friend, Tim Mitchell is hosting and he’s got a neat invite. He’s asking us how to...
2024-10-08
48 reads
It’s time for the monthly T-SQL Tuesday blog party. This month a longtime friend, Tim Mitchell is hosting and he’s got a neat invite. He’s asking us how to...
2024-10-08
12 reads
If a technology is still viable, don’t overlook it. Don’t get caught up chasing the “shiny” or the “perfect” solution just because you can.
2024-10-08
22 reads
Last Updated on September 24, 2024 by John Morehouse Years ago, I saw the wave of the future and that wave was Cloud. The Cloud is not a fad...
2024-10-07 (first published: 2024-09-24)
392 reads
I got a message a few months back that Microsoft was deprecating the MySQL server version that I was using in Azure. The cost was going up, and while...
2024-10-07
15 reads
I often need to shrink database files. I know, ‘shrinking is bad’, however there are situations where it is very much needed. In my line of work, I come...
2024-10-07
258 reads
Sometimes, work tasks and questions that come up in the SQL Server Community Slack coincide.
A couple weeks ago, DrData asked
With SET STATISTICS IO ON, is there really no way...
2024-10-07 (first published: 2024-09-22)
295 reads
In the modern data-centric landscape, SQL stands out as the dominant tool. It's essential for revealing insights buried within extensive databases. However, basic SQL queries can only take you...
2024-10-07
39 reads
Thanks to everyone that came to my talks. Slides are below. Best Practices for Seamless Deployments Balance in Life with a Career If you have questions, please reach out.
2024-10-06 (first published: 2024-10-05)
25 reads
Thanks to everyone that came to my talks. Slides are below. Best Practices for Seamless Deployments Balance in Life with a Career If you have questions, please reach out.
2024-10-05
5 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