Re-teaming is Good: Here’s Why
Note: This post is based on an editorial I originally published over at SQL Server Central Years ago, I worked on a fabulous team of eight database administrators We...
2020-03-13
19 reads
Note: This post is based on an editorial I originally published over at SQL Server Central Years ago, I worked on a fabulous team of eight database administrators We...
2020-03-13
19 reads
I learned an interesting thing about ALTER VIEW behavior in SQL Server when applied to indexed views. This is covered in the product documentation, but it’s not something I...
2020-03-02
65 reads
Redgate is growing, and we have some fresh, new open positions around the world which would be a great fit for SQL Server developers or DBAs who would like...
2020-02-21
11 reads
In the past week or so, the Microsoft Data Platform community has begun having a discussion about inclusivity, both on Twitter and across community blog posts. This conversation began...
2020-02-13
11 reads
When implementing any kind of automation for database deployments, it’s important to implement safeguards for your production environment. This is needed even in the best conditions when team members...
2020-02-05
20 reads
I asked a question on Twitter yesterday: And check out the magic of the sqlhelp hash tag, I got loads of answers! So many that I’m actually selecting a...
2020-02-01
17 reads
In this 70 minute livestream recording, I kick the tires of a fresh new Azure DevOps demo environment showing Redgate’s Hybrid Model for SQL Source Control and SQL Change...
2020-01-25
19 reads
One of most the fun things about working as an Advocate at Redgate is getting to help clients determine their preferred workflow for database DevOps. Teams often have unique...
2020-01-18
20 reads
Wishing you all a very happy, prosperous and peaceful new year 2020! May new year make us Human who cares for all the living being and for our mother...
2020-01-11
10 reads
Wishing you all a very happy, prosperous and peaceful new year 2020! May new year make us Human who cares for all the living being and for our mother...
2020-01-11
31 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