Trace Flags in Azure SQL Database
One of the ways that you take more direct control over your SQL Server instances is through the use of...
2015-10-13 (first published: 2015-10-05)
1,242 reads
One of the ways that you take more direct control over your SQL Server instances is through the use of...
2015-10-13 (first published: 2015-10-05)
1,242 reads
Working on my third year of “Speaker of the Month” posts now. The good news, I haven’t run out of...
2015-10-02
474 reads
The Nominations Committee has done their job and the final report has been published.
Good luck to everyone running. Thank you...
2015-09-14
472 reads
I created this example several years ago that illustrates how foreign key constraints can help performance. It’s a contrived example....
2015-09-21 (first published: 2015-09-09)
2,693 reads
Feast or famine.
The last several months I just haven’t seen that many speakers, let alone that many community speakers. Then,...
2015-09-04
455 reads
A lot of times you’ll hear how people are experiencing sudden, intermittent, poor performance on a query, bad parameter sniffing...
2015-09-02 (first published: 2015-08-24)
1,584 reads
I recently spent two days consulting with a company on their database development and deployment processes. They are a small, capable, team...
2015-08-19
756 reads
I was actually travelling for most of July and some of that was on holiday with the family, the real...
2015-08-13
588 reads
I’m actively working to put together the leadership course that I talked about here and here. No, not full time. I...
2015-08-11
508 reads
Does generating an Estimated Plan cause that plan to be loaded into the plan cache?
No.
What? Still here? You want more?...
2015-08-18 (first published: 2015-08-10)
1,782 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...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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