I am a Microsoft Data platform MVP
I am so excited and happy to be chosen to receive the Microsoft Data Platform MVP award. This is my...
2016-07-04
484 reads
I am so excited and happy to be chosen to receive the Microsoft Data Platform MVP award. This is my...
2016-07-04
484 reads
In case you haven't heard, SQL server 2016 is generally available today! If you haven't try it out, you should...
2016-06-02
849 reads
Last time, I talked about cloud backup and the two different ways of doing it – directly and using StorSimple appliance...
2016-05-27 (first published: 2016-05-19)
1,537 reads
In the previous post, I talked about how we can revamp the backup infrastructure for SQL to backup directly to Azure,...
2016-04-15 (first published: 2016-04-11)
2,200 reads
It finally comes to this date, 12th April 2016, the end of support for SQL server 2005! SQL 2005 is...
2016-04-12
677 reads
Backup is one of the major task for DBAs, it has many different options and ways for each companies to...
2016-04-07
1,636 reads
Microsoft accounted yesterday that SQL server will plan run in Linux, with early private preview available today along with full...
2016-03-09
2,259 reads
Previously we discussed about the pre-installation consideration, which can be found here. In the second part of this series, we...
2016-03-01
1,556 reads
I have been wanting to write this for a long time, and finally got time to do it. Which is...
2016-02-29 (first published: 2016-02-23)
2,745 reads
This is one of the hot topic within the DBA community, what should be the best setting for parallelism in your environment? The answer is – it depends! J
Let’s...
2016-01-13
75 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