Daily Coping 26 Jul 2022
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...
2022-07-26
9 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...
2022-07-26
9 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...
2022-07-25
22 reads
In the last Database Fundamentals post, I explained what a unique constraint was and how you can create them using the GUI. Using TSQL to create a constraint is...
2022-07-25
91 reads
In my first post, I reference that by the end of your first 30 days you should have a 90-day plan of things to tackle at your job and...
2022-07-25 (first published: 2022-07-12)
561 reads
The SQL Solutions Group asked me to do a webinar with them, which is still an honor for me. They’ve been working with various clients on DevOps development practices,...
2022-07-25
28 reads
This month’s T-SQL Tuesday is hosted by Deborah Melkin(b|t), and she has an interesting topic. She wants us to write a rant on a scenario we encountered at a...
2022-07-25 (first published: 2022-07-12)
325 reads
I had a great talk today at SQL Saturday New Jersey 2022 on DevOps and databases. Good crowd and good questions. Got caught in a spotlight picture as well:...
2022-07-23
32 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...
2022-07-22
33 reads
I’ve been debating how we better organize speaker resources and one of the things I proposed was a pre-con registry of speakers. I did so at the sqlsaturday blog....
2022-07-22 (first published: 2022-07-13)
85 reads
Over the past couple of years, I’ve developed several tools that I’ve been using during my Performance Tuning and other related assignments. I thought to share it with the...
2022-07-22 (first published: 2022-07-11)
1,273 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