Key Sets, or Inverted Keys - defining a key as a set of tuples
TL;DR:
I have been doing a lot of thinking about data models for the last couple of weeks. I have, just...
2017-12-19
474 reads
TL;DR:
I have been doing a lot of thinking about data models for the last couple of weeks. I have, just...
2017-12-19
474 reads
Just a quick one today. TL;DR: Remove yourself from some unnecessary AD groups.
If you've ever received the message "login failed...
2017-11-24 (first published: 2017-11-12)
3,370 reads
If you're seeing this for the second time, my apologies. I wanted to update the title but had to delete...
2017-11-13
3,190 reads
Tricky triggers
In my last entry I noted that the performance of "instead-of" triggers can be tricky.
One of the reasons for...
2017-11-07
573 reads
I'm working on problems of enterprise data integration in the role of enterprise architect, but I am and have been...
2017-11-06 (first published: 2014-11-19)
6,375 reads
Defining the Problem
Imagine I have two different systems - say, a CRM and an ERP - on different SQL Servers. Both systems...
2017-11-05
476 reads
Update:
After all of this SMO stuff failed (changing the permission set to unsafe got around the security exception, but instead...
2011-06-15
1,485 reads
Relation Types
create type type_T(i int primary key clustered, j int check (j > 0)) -- relation type. Includes constraints!
create table T(type_T)
Relvar Assignment
This...
2011-06-15
957 reads
SSMSDeploy version 1.5 is ready. This one has a LOT of GUI tweaks. No database changes in this one, so...
2011-01-22
960 reads
Fixed a couple of issues and made some GUI tweaks. Please see the download page for the latest version, and...
2011-01-20
713 reads
By Steve Jones
It’s Prime Day. A few of my recommendations, since I want to do some...
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...
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