9003 is a Scary Number
My last post talked about 9002 errors and how they *might* be corruption.
Recently I moved up to the next consecutive...
2017-06-21
1,986 reads
My last post talked about 9002 errors and how they *might* be corruption.
Recently I moved up to the next consecutive...
2017-06-21
1,986 reads
I have been working at Microsoft now for 3 years and 4 months (side note: it’s by far the best...
2017-06-21
839 reads
Two years running, I will be presenting at SQL Saturday Indy and SQL Saturday Louisville this year again! Come see my SQL Server 2017 (Linux and Beyond) and Stretch...
2017-06-21
12 reads
Target. Home Depot. NASA. U.S. Army. Anthem. Wall Street Journal. MarketWired. Ashley Madison. What do they all have in common?...
2017-06-21
799 reads
This weekend SQL Saturday Dublin occurred. For those that don’t know SQL Saturdays are free conferences with local and international speakers...
2017-06-21
908 reads
If you are upgrading your instance to 2016 (or 2017 soon) then you probably are going to want to run...
2017-06-21
657 reads
I’ve been working on a proof of concept for a customer that involved using Azure Analysis Services as a cache...
2017-06-21
2,576 reads
I’ve been working on a proof of concept for a customer that involved using Azure Analysis Services as a cache...
2017-06-21
532 reads
If you were at the Microsoft Data Insights Summit or were watching the live stream of the keynote, then you...
2017-06-21 (first published: 2017-06-13)
2,921 reads
AlwaysOn technology in MS SQL Server is designed to increase the availability of your database, it is another step toward...
2017-06-21 (first published: 2015-08-06)
16,881 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