Why I Support Code Automation Tools Like ORMs
I know I’m a weirdo. I’ve always been a weirdo. When I was a DBA (now I only play one on TV), I was a weirdo too. Case in...
2020-02-25 (first published: 2020-02-17)
545 reads
I know I’m a weirdo. I’ve always been a weirdo. When I was a DBA (now I only play one on TV), I was a weirdo too. Case in...
2020-02-25 (first published: 2020-02-17)
545 reads
Extended Events can do things that simply are not possible with Profiler and another example comes from the stack of audit events that exist only in Extended Events. One...
2020-02-24
59 reads
I am very passionate about having a disaster recovery architecture, plan and strategy. This is very important for business continuity. I will be walking you through a journey on implementing High Availability (HA) (AlwaysOn Availability group) on MSSQL Server.
2020-02-24 (first published: 2020-02-14)
704 reads
I’ve been very blessed to be able to work for Redgate Software. We’ve done some amazing stuff over the years. We’re going to be doing even more amazing stuff...
2020-02-24
35 reads
ISACA has a SheLeadsTech webinar for tomorrow, February 25, 2020 titled Braving the Wilderness of Cybersecurity. Registration Link: https://www.isaca.org/education/online-events/lms_w022520 If you can’t make the talk, ISACA archives all webinars...
2020-02-24
19 reads
This Wednesday, February 26th, I will be presenting a new session entitled “All Things SQL in the Microsoft Cloud” for the Omaha Azure Users Group, starting at 6pm Central...
2020-02-24
9 reads
Three very powerful but simple hacks that can give you back dozens of minutes per day.
Related Posts:
Best New(ish) SSMS Feature December 26, 2017
Puzzles and Daily Trivia May 14,...
2020-02-24 (first published: 2020-02-12)
1,454 reads
I am sat in the PowerShell Saturday in Hamburg. You can see me on the right of this picture writing my previous blog post! I was talking with my...
2020-02-22
48 reads
The idea of this blog post, like many others I write, is to document a workaround solution to my problem. Hopefully I can also help someone that may be...
2020-02-21 (first published: 2020-02-12)
2,978 reads
Redgate is growing, and we have some fresh, new open positions around the world which would be a great fit for SQL Server developers or DBAs who would like...
2020-02-21
11 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