Statistics in SQL Server
I’ve put together a new Curah! of links to some of the better articles on SQL Server Statistics, specifically those...
2014-09-15 (first published: 2014-09-10)
7,399 reads
I’ve put together a new Curah! of links to some of the better articles on SQL Server Statistics, specifically those...
2014-09-15 (first published: 2014-09-10)
7,399 reads
I’m learning how to speak German. Interestingly enough, you don’t start off reading dissertations. Instead, you begin by learning the...
2014-09-09
831 reads
This month I’m very grateful because I was given the opportunity to present at DevLink in Chattanooga. I got to...
2014-09-05
531 reads
No, this is not about politics. It’s about your WHERE clause… and your JOIN criteria… and your HAVING clause. It’s about a...
2014-09-08 (first published: 2014-09-03)
6,770 reads
I don’t mind saying that amyotrophic lateral sclerosis (ALS), also known as Lou Gehrig’s disease, scares me. A degenerative disease...
2014-08-21
1,237 reads
As companies go, Red Gate is a little different. That is readily apparent in our tools and the philosophy behind...
2014-08-20
756 reads
A discussion that I’ve frequently had with organizers of SQL Saturday events, our own people here at Red Gate, authors,...
2014-08-19
566 reads
I’m excited to able to say that I’ve been given the opportunity to put on a full day workshop at...
2014-08-14
811 reads
I was approached by a man at SQL Bits who only wanted to thank me for blogging. He said, “I...
2014-08-13 (first published: 2014-08-06)
8,115 reads
Speaker of the Month is now officially one year old.
I went back and reread my first post. The goals were...
2014-08-08 (first published: 2014-08-01)
7,055 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 Extreme DAX: Take your Power...
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
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