SSMS Presenter Mode
SQL Server Management Studio (SSMS) release candidate 17.0 RC2 works side-by-side with generally available releases (16.x), but it is not...
2017-02-22
564 reads
SQL Server Management Studio (SSMS) release candidate 17.0 RC2 works side-by-side with generally available releases (16.x), but it is not...
2017-02-22
564 reads
Since installing SQL Server vNext CTP 1.3 I found out that there is a new way to return statistics histogram...
2017-02-21
378 reads
I had a need to setup transactional replication from my SQL Server to SQL Database (Azure) where I only needed...
2017-02-20
390 reads
Working with a couple of databases that needed TDE I noticed when I enabled one of them that it was...
2017-02-16
375 reads
Logging into the Azure portal is a daily task of mine and my eyes light up when I see features...
2017-02-15
334 reads
The great thing about new versions of SQL Server is the fact that they are packed full of new features...
2017-02-13
400 reads
Over the past 6 months I have been trying to push myself to use extended events (XEvents) over SQL trace,...
2017-02-10 (first published: 2017-02-06)
1,308 reads
I have been pretty busy recently working with Joe Sack from Microsoft and getting my hands dirty with SQL Server...
2017-02-03
730 reads
Have you ever wanted to compare execution plans from SQL Server Management Studio? Well with the newer version of the...
2017-02-02
445 reads
Setting up SQL Server Management Studio (SSMS) based performance dashboard driven off servers that are registered through a Central Management Server (CMS).
2017-02-02 (first published: 2015-08-20)
16,004 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