Spoooky SQL at the Baton Rouge SQL/.NET Campfire Stories!
Enjoyed the heck out of tonight's October special edition of the virtual Baton Rouge .NET and SQL User Groups meeting, where we had a lot of active chat, three...
2020-10-15
24 reads
Enjoyed the heck out of tonight's October special edition of the virtual Baton Rouge .NET and SQL User Groups meeting, where we had a lot of active chat, three...
2020-10-15
24 reads
This — like last week’s post — is not about SQL Server or Azure SQL Database. In a way, it hearkens back to a post I wrote a few years...
2020-10-14
37 reads
Data engineers, pipe line developers, general data enthusiasts will be spending most of their time within a notebook. Here you develop your code, nice visualisations and commentary boxes are...
2020-10-14
44 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2020-10-14
18 reads
Sometimes when you’ve created a SSIS catalog, along with folders, environments and environment variables, you want this content on another server. Unfortunately, you can only script out these objects...
2020-10-14 (first published: 2020-10-06)
501 reads
It’s just over 30 days to the 2020 PASS Summit and that is plenty of time to get the boss to say yes, but you have to ask! I...
2020-10-14 (first published: 2020-10-05)
185 reads
There is no doubt that this is a time when we all have to be extra aware and work towards keeping our skills aligned with market needs. During this...
2020-10-13 (first published: 2020-10-07)
341 reads
No, No, not those dumps: SQL Server Memory dumps!! Recently, I was on Slack and wondered into the #firstresponderkit channel. I am a big fan of all the First...
2020-10-13 (first published: 2020-10-06)
685 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2020-10-13
13 reads
This post is for the most recent #tsql2sday, a monthly exercise where a topic is proposed by a community member and everyone is invited to post their thoughts on...
2020-10-13
10 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