Use the WordPress Revision Counter to Keep Shipping Posts
I haven’t been at this blogging thing an extremely long time, and I certainly haven’t been as consistent as I’ve...
2015-03-24
707 reads
I haven’t been at this blogging thing an extremely long time, and I certainly haven’t been as consistent as I’ve...
2015-03-24
707 reads
When Fusion IO burst onto the scene in 2007, offering a PCIe card that was said to be able to...
2015-03-16 (first published: 2015-03-10)
6,038 reads
Imagine this scenario: One of your servers just crashed, and you open a ticket with Microsoft for them to perform...
2014-11-06
1,937 reads
Databases and newborns have a lot in common. They both require constant care. They both require constant monitoring. They also...
2014-10-20 (first published: 2014-10-14)
7,035 reads
A while back I had written a post about why I’m excited about Hekaton (now called ‘In-Memory OLTP’ – not sure...
2014-09-22 (first published: 2014-09-17)
8,449 reads
If you work in IT, the office becomes your second home. It’s where we make a living, and most of...
2014-03-11 (first published: 2014-02-28)
2,959 reads
In one of SQL Server Central’s recent daily newsletters, Steve Jones’s editorial was inquiring whether or not anyone has been...
2014-03-06
1,170 reads
That guy or gal over there going on and on about spindles and IOPS – that’s your SAN admin. For the...
2014-02-17 (first published: 2014-02-12)
1,631 reads
I’m just a little late to the party, but no time like the present, right? I plan to be very...
2014-02-15
638 reads
If you administer a SQL Server Reporting Services server, chances are you’ve had users complain the report manager is loading...
2013-11-07
4,529 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