Free SQL Training: Dive into Databases This December!
Want to learn SQL and get some real practice this December? Check out the Basic SQL Practice: A Store course – it's totally free for the entire month! This...
2024-12-14
40 reads
Want to learn SQL and get some real practice this December? Check out the Basic SQL Practice: A Store course – it's totally free for the entire month! This...
2024-12-14
40 reads
dolonia – n. a state of unease prompted by people who seem to like you too much, which makes you wonder if they must have you confused with someone...
2024-12-13
85 reads
You can find the slides for the session Building the €100 data warehouse with the Azure Data Platform in this GitHub repo.
The post Cloudbrew 2024 – Slides first appeared...
2024-12-13
28 reads
I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter asked about the difference between Min() and First_value. This post looks at a few cases....
2024-12-13 (first published: 2024-12-04)
716 reads
Several months ago, I discussed my customer’s intention to enable trace flag 3625. Since that time, we have observed an intriguing phenomenon when encountering a login failure. To demonstrate...
2024-12-13 (first published: 2024-12-10)
518 reads
Can an AI help me with some database API work? Let’s see. This is part of a series of experiments with AI systems. The Scenario One of the things...
2024-12-11
135 reads
This post comes off the back of my last, where I looked at issues caused by explicitly declaring a large number of values in an IN clause. The query...
2024-12-11 (first published: 2024-12-04)
938 reads
The post Lukáš Karlovský: I got the green light from management and built Fabric specialization from scratch appeared first on Joyful Craftsmen.
2024-12-11 (first published: 2024-12-05)
1,064 reads
SQL Server has evolved a great deal since I first started working with SQL Server 6.5 in 1998. Unfortunately I continually come across newer systems that are configured with...
2024-12-10
92 reads
Want to seriously boost your data skills? Mastering advanced SQL is the key, whether you're in data analysis, data science, or any field that uses data. Trust me, it's...
2024-12-10
272 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