SQL Performance Dashboards – update
SQL Server Performance Dashboards – update The first article that I ever wrote (http://www.sqlservercentral.com/articles/SQL+Server/127992/) was last year where I wanted to...
2016-10-07
625 reads
SQL Server Performance Dashboards – update The first article that I ever wrote (http://www.sqlservercentral.com/articles/SQL+Server/127992/) was last year where I wanted to...
2016-10-07
625 reads
I know there are people out there that will be going from older versions of SQL to SQL Server 2016, yes...
2016-10-06
489 reads
Question – Can you detach a corrupt database? Answer – IT DEPENDS! More specifically it depends on the SQL Server version. SQL...
2016-10-04
605 reads
The query store, Borko Novakovic Senior Program Manager from Microsoft calls this feature “Similar to an airplane’s flight data recorder”....
2016-10-03
458 reads
I have been eager to write this blog post for a while now. I want to share my experience of...
2016-09-29
878 reads
A major benefit of Azure SQL Database (PaaS) is the fact that Microsoft manages the backups – it’s great because recovering...
2016-09-23 (first published: 2016-09-16)
1,230 reads
For this blog post I want to show you the steps required to setup an Azure SQL Data warehouse and...
2016-09-21
518 reads
It is quite frustrating when SSMS (SQL Server Management Studio) randomly crashes, all too often for my liking. If you have...
2016-09-20
1,865 reads
I thought I would share the output of some DiskSpd tests that I conducted on Azure VMs that ultimately will...
2016-09-19
564 reads
The collection of Azure SQL Database cmdlets can be found at – https://msdn.microsoft.com/en-us/library/mt574084.aspx. There are alot, however I tend to use...
2016-09-15
492 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