T-SQL Tuesday #181: A Technology Present
It’s the last T-SQL Tuesday of the year, and it’s amazing to think we’ve gotten to #181. That’s over 15 years of monthly blog parties. This month we have...
2024-12-10
46 reads
It’s the last T-SQL Tuesday of the year, and it’s amazing to think we’ve gotten to #181. That’s over 15 years of monthly blog parties. This month we have...
2024-12-10
46 reads
One of our internal people was looking to test some process in (I assume) Redgate Monitor and needed more job history than they had in msdb.sysjobhistory. They wanted to...
2024-12-09 (first published: 2024-11-27)
240 reads
Have you ever wondered where a certain field is used in a report? Or maybe you need an easy way to find broken field references in a report? Certain...
2024-12-09 (first published: 2024-11-27)
426 reads
fardle-din – n. a long-overdue argument that shakes up a relationship, burning wildly through your issues like a forest fire, which clears out your dry and hollow grievances and...
2024-12-06
33 reads
I had been meaning to post this, so as I finished a piece that referenced this, I decided to post the picture. This was from Small Data SF, where...
2024-12-06
43 reads
The 11th episode is now live, recorded a few weeks ago at the PASS Data Community Summit. This was a lot of fun, us grabbing a space in the...
2024-12-06 (first published: 2024-11-22)
199 reads
Announced at Microsoft Ignite last week were some new product features related to the data platform and AI. Check out the Major announcements and Book of News. Below are...
2024-12-06 (first published: 2024-11-26)
343 reads
In this step-by-step tutorial, learn how to run MySQL, PostgreSQL, MongoDB, and other stateful applications on Kubernetes.Even though almost no one questions using Kubernetes (K8s) to manage container applications...
2024-12-04 (first published: 2024-11-23)
494 reads
The post When is the perfect moment to build a data strategy in a company? appeared first on Joyful Craftsmen.
2024-12-04 (first published: 2024-11-25)
304 reads
I wanted to figure out how big (or approximately how big) my dump file would be. In QA, I have (relatively) large dbs (compared to prod). Enter the pgstattuple...
2024-12-02 (first published: 2024-11-21)
194 reads
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...
It is Friday, the queries are running, and nobody is watching the bill. That...
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