A New Word: Candling
candling – v. intr. the habit of taking stock of your life on the occasion of your birthday, letting it serve as a kind of internal referendum on all...
2024-01-12
28 reads
candling – v. intr. the habit of taking stock of your life on the occasion of your birthday, letting it serve as a kind of internal referendum on all...
2024-01-12
28 reads
It’s the last Friday of the year and I’ve been struggling to think of a good way to close things ... Continue reading
2024-01-12 (first published: 2023-12-29)
322 reads
Introduction
You have probably created various auxiliary tables, columns or metrics during report development. Before the final deployment of the report into production, it is necessary to delete these auxiliary...
2024-01-12 (first published: 2024-01-02)
813 reads
Building a Terraform module for Azure SQL DB is like packaging your infrastructure magic into a reusable box. It’s the kind of thing that makes your IT life smoother....
2024-01-10 (first published: 2023-12-29)
360 reads
While a private endpoint and vNets are preferred, sometimes we need to configure Azure SQL Database or Azure Storage to allow use of public endpoints. In that case, an...
2024-01-10 (first published: 2024-01-02)
446 reads
Welcome back to the fourth installment of our blog series on using the Pure Storage PowerShell SDK2. In this post, you’ll learn how to use Purity Tags to classify...
2024-01-10
40 reads
My good friend Gina Menorek shared this article from NY Post on the overwhelming exhaustion among tech workers. The article talks of ‘quiet quitting’ – not quitting our jobs...
2024-01-08 (first published: 2023-12-31)
697 reads
I was worried about some of my data, so I wanted to be sure I had a backup of my Teslamate system. This post covers the config I’d added...
2024-01-08
110 reads
I recently had a friend reach out to me about database performance dropping drastically. I asked if anything had changed recently on the server, and they told me that all...
2024-01-08
28 reads
This SQL Server blog roll talks about the few blog articles I have published in last couple of months. I am certain you would like reading
The post SQL...
2024-01-08 (first published: 2024-01-01)
230 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