Continuous Integration
It’s T-SQL Tuesday again! This month we are being hosted by James Anderson (b/t). Thanks James! He has asked us...
2017-05-09
422 reads
It’s T-SQL Tuesday again! This month we are being hosted by James Anderson (b/t). Thanks James! He has asked us...
2017-05-09
422 reads
Sometimes it helps to go back to the basics and indexing is always a great topic. SQL Server has a...
2017-05-09 (first published: 2017-04-27)
3,110 reads
By David Postlethwaite
Introduction
Dynamic data masking is a really useful new tool in SQL Server 2016. Keeping data safe is one...
2017-05-09
1,091 reads
I did a dangerous thing, and I want to make sure that YOU DO NOT do the same. I was...
2017-05-09
347 reads
Watch this week's video on YouTube
Recently I've been working with JSON in SQL Server 2016 a lot.
One of the hesitations many people have with using JSON in SQL Server...
2017-05-09
49 reads
In the previous blog, we discussed how to Configure Distribution Database. Once you setup your Distribution database successfully, you can...
2017-05-09
2,910 reads
As promised, here are my slides from the 24 Hours of PASS on Data Security:
S1 – Brian Kelley_WhatYouAbsolutelyMustKnowAboutSQLServerSecurity (.pptx – 733 KB)
S7 – Brian...
2017-05-09
391 reads
I’m writing this post because I want to put some more stuff around dates and times in one place. I additionally teach SQL Server classes and often come up...
2017-05-09
6 reads
I’m writing this post because I want to put some more stuff around dates and times in one place. I...
2017-05-09
1,066 reads
I’m writing this post because I want to put some more stuff around dates and times in one place. I additionally teach SQL Server classes and often come up...
2017-05-09
10 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