31 Days of SSIS for SQL Server 2014 Update Question
A few years back, I put together a blog series on SQL Server Integration Services (SSIS) titled 31 Days of SSIS....
2014-02-24
1,300 reads
A few years back, I put together a blog series on SQL Server Integration Services (SSIS) titled 31 Days of SSIS....
2014-02-24
1,300 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-02-24
1,051 reads
Photo credit – Jenn and Tony Bot
Sometimes old stuff is just as cool as new stuff. Over the past few years,...
2014-02-21
761 reads
A couple weeks back, I was taking a look at a map that had been put together on Flowing Data...
2014-02-21 (first published: 2014-02-18)
2,387 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-02-20 (first published: 2014-02-17)
1,818 reads
Photo credit – JStove
Old posts are like unicorns. You might see them just once, but it’d sure be nice to have...
2014-02-14
621 reads
Photo credit – Dennis Wong
A couple weeks back, in a post on certifications, I mentioned the Second Shot offer from Microsoft...
2014-02-12
559 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-02-10
569 reads
Photo credit – Travis
Ever go digging through your backyard for dinosaur bones? Maybe not, but it’s worthwhile from time to time...
2014-02-07
787 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-02-03
1,094 reads
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Wa:0817781222 Jl. Otto Iskandardinata No.37, Karanganyar, Kec. Subang, Kabupaten Subang, Jawa Barat 41211
Wa:0817781222 Jl. Ir. H. Juanda No.118, Lebakgede, Kecamatan Coblong, Kota Bandung, Jawa Barat 40132
Wa:0817781222 Jl. Ahmad Yani No.9, RT.01/RW.05, Marga Jaya, Kec. Bekasi Sel., Kota Bks, Jawa...
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