SQL Server 2017 Announced
By now you will have heard that the next version of SQL Server has been announced. There’s no release date yet,...
2017-05-03
96 reads
By now you will have heard that the next version of SQL Server has been announced. There’s no release date yet,...
2017-05-03
96 reads
When I was on SQLCruise recently – Buck Woody (b|t) made a interesting statement – that in a room of 23 people,...
2017-05-03 (first published: 2017-04-24)
1,934 reads
Terabytes of data, millions of rows; the entire business depends on this — a database administrator’s responsibility is as massive as...
2017-05-03
573 reads
CROSS APPLY was introducted as part of TSQL in SQL Server 2005. Origionally it was created as a way to...
2017-05-03
44 reads
A quick blog post to start the day, If you remember a few months ago I blogged about SQL Server...
2017-05-02
478 reads
I’ve had another presentation added for the 24 Hours of PASS; this one is the first session of the line-up,...
2017-05-02
375 reads
For the past few months, one my customers had been trying to diagnose an issue with SQL Server paging out...
2017-05-02
1,297 reads
The new SQL Server Master-Class in – why a SQLSentry Bootcamp
(DE) Die wichtigsten Infos gerafft zuerst: Vom 26. bis 28. Juni führe ich in Frankfurt eine neue SQL Server...
2017-05-02
13 reads
The new SQL Server Master-Class in – why a SQLSentry Bootcamp
(DE)
Die wichtigsten Infos gerafft zuerst:
Vom 26. bis 28. Juni...
2017-05-02
476 reads
How many times have you written a program, ETL, analysis job, etc… that seemed like it would never finish running?
Although poor performance can be caused in a multitude of...
2017-05-02
25 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...
Because we are NABL Accredited Laboratories, our personal care and cosmetics research center provides...
WhatsApp:0817-866-887 Jl. Ahmad Yani No.31, Pattunuang, Kec. Wajo, Kota Makassar, Sulawesi Selatan 90174 (@bcakcumakassar)
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