Query Store and Optimize For Ad Hoc
I love presenting sessions because you get so many interesting questions. For example, what happens with Optimize for Ad Hoc...
2016-04-11 (first published: 2016-03-28)
1,942 reads
I love presenting sessions because you get so many interesting questions. For example, what happens with Optimize for Ad Hoc...
2016-04-11 (first published: 2016-03-28)
1,942 reads
I’m all like:
Because I saw this on an eval:
I’ve been trying to ramp up to take advantage of my MSDN...
2016-03-25
1,118 reads
Time flies. I didn’t notice that I hadn’t posted an update in February.
There’s been a lot going on since I...
2016-03-24
432 reads
You can’t query across databases in Azure SQL Database… or can you?
Let’s check. I’ve created two new databases on an...
2016-03-28 (first published: 2016-03-21)
3,129 reads
It’s weird being an introvert who likes to talk to people, but what can I do. I like talking to...
2016-03-17
467 reads
Not for you, for me.
I’m sure you’ve heard the statement: Praise in public. Criticize in private.
I agree with this approach....
2016-03-18 (first published: 2016-03-14)
1,736 reads
Blog post #3 in support of Tim Ford’s (b|t) #iwanttohelp, #entrylevel
Read more about Tim’s challenge here.
It’s very easy to think of...
2016-03-10 (first published: 2016-03-07)
1,810 reads
I’m finally getting back out to community events so I should be able to avoid giving this gigantic honor to professional...
2016-03-04
409 reads
You need to be aware that you’re going to see differences when you’re working with Azure SQL Database when it...
2016-03-07 (first published: 2016-02-29)
1,906 reads
One of the many advantages of SQL Cruise is the ability to have enough time during a presentation to be...
2016-02-24
624 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