How to remove CardinalityEstimate in query plan on computed columns…
Hello,
I have come across a really good tip if you’re using computed columns that involve a concatenation of columns and...
2014-06-15
723 reads
Hello,
I have come across a really good tip if you’re using computed columns that involve a concatenation of columns and...
2014-06-15
723 reads
Have you ever had the need to select values that are directly on the next line down but drag-and-drop selects...
2014-01-27
277 reads
Have your ever had a timeout error in a visual studio 2012 unit test like below?
How to get around this...
2013-12-18
1,010 reads
Have you ever wanted to evaluate 2 tables in one IF BEGIN END block, I firstly wrote this:-
Which always evaluated...
2013-12-05
356 reads
I’ve been thinking about a question from a application developer regarding generating a unique identifier outside of SQL and persisting...
2013-10-08 (first published: 2013-10-03)
2,633 reads
I’ve been thinking about a question from a application developer regarding generating a unique identifier outside of SQL and persisting...
2013-10-03
483 reads
Has anyone ever though of pushing a SQL Server database backup out remotely? (SQL Native andor RedGate Backups) My idea...
2013-08-21 (first published: 2013-08-16)
4,825 reads
I’m writing a table value function that returns a cdc recordset that, instead of returning changed data row-by-row, I need...
2013-08-19
654 reads
CDC changes column-by-column instead of row-by-row, can you improve it???.
2013-08-19
795 reads
Wouldn’t it be nice if SQL Server allowed this functionality? for instance if did the below:-
I get the above error....
2013-08-19
1,046 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