T-SQL Tuesday Retrospective #015: Aggregations
In early 2011 Jes Borland invited us to write about aggregations: I want to hear how you solved business problems with aggregate functions. I want to see your cool...
2021-06-30
43 reads
In early 2011 Jes Borland invited us to write about aggregations: I want to hear how you solved business problems with aggregate functions. I want to see your cool...
2021-06-30
43 reads
When using a Geo Replicated Azure SQL Database Readable Secondary there are a few things to consider when it comes to performance tuning. Check out this episode of Data Exposed:...
2021-06-30
15 reads
We all had those calls, it’s the middle of the night and we get that phone call that a customer is getting error messages due to their tempDB being...
2021-06-30 (first published: 2021-06-18)
748 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-06-29
13 reads
While we are clearly beginning to see in-person events on the calendar, the vast majority of presentations, events, talks, etc., are virtual. There are a lot of positives to...
2021-06-29
4 reads
SQL Clone is a neat product from Redgate that I wish I’d have had when I was doing database software development. It lets me have a consistent image for...
2021-06-28 (first published: 2021-06-16)
236 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-06-28
16 reads
Welcome back to our series, Server Review Essentials for Accidental and Junior DBAs, where we’ve been taking an in-depth look at how to get ready to perform regular SQL...
2021-06-28 (first published: 2021-06-16)
459 reads
Business Continuity in Azure SQL database is about the mechanism, policies and procedures that enable business to operate in the face of disruption such as(more...)
2021-06-26
48 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-06-25
21 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