Future of Database Mirroring
One of the beloved feature of SQL server standard edition for HA is database mirroring, since you only have 2-node...
2015-03-12
486 reads
One of the beloved feature of SQL server standard edition for HA is database mirroring, since you only have 2-node...
2015-03-12
486 reads
Most companies required to keep their database backup offsite (on tape) for many years due to audit requirement. This normally...
2015-03-12
969 reads
2015 should be a very busy year for most DBAs, due to the end of support of SQL server 2005...
2015-02-06
325 reads
I have been following a few blogs for a number of years now, and one of the most enjoying blog...
2015-02-02
288 reads
We all know that with the latest Windows 2012 R2 and SQL 2014, even with the standard edition, it can...
2014-11-14
410 reads
Every DBA in their career should have done DR drill at some point, in fact it should be done in...
2014-09-18
2,440 reads
You might already read lots of post about SQL server 2012 is license per core rather then per socket and...
2014-04-07
516 reads
Many of us are planning to move to SQL Server 2012 in the coming year, and one of the feature...
2014-04-01
334 reads
Every now and then we all need to perform backup or restore, for large databases when we need to perform...
2013-10-09
612 reads
Everyone knows that installing SQL server requires .Net frameworks 3.5, and it normally install by default, when you run the...
2013-03-12
595 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