A New Word: Povism
povism – n. the frustration of being stuck inside your own head, unable to see your face or read your body language in context, only ever guessing how you...
2024-08-16
36 reads
povism – n. the frustration of being stuck inside your own head, unable to see your face or read your body language in context, only ever guessing how you...
2024-08-16
36 reads
The Problem While performing an instance migration this spring, I happened upon something I didn’t expect in [dbatools](https://dbatools.io/). It should have been a simple backup/restore copy of the databases,...
2024-08-16 (first published: 2024-08-06)
273 reads
Our special projects team was eager to build Beeper a new blogging home. Here's the beautiful result.
2024-08-16 (first published: 2024-08-15)
26 reads
This is a quick blog post to announce that I am reviving Kilt Day at PASS Data Community Summit. Over the last few years… ah hell, let’s just say...
2024-08-16 (first published: 2024-08-01)
138 reads
Social media has become unruly and hard to navigate. (An understatement, we know.) How can the fediverse make social media fun again? Tune in.
2024-08-16
33 reads
I saw a post recently where someone was concerned about where xp_cmdshell was in use inside their system. They felt it was a security risk, and decided to get...
2024-08-14 (first published: 2024-07-31)
599 reads
No matter how hard Azure Data Studio (ADS) is pushed by Microsoft, most DBAs still use SQL Server Management Studio (SSMS). In this blog post, I’ll go through my...
2024-08-14 (first published: 2024-08-03)
883 reads
It’s just a couple of days away from SQL Saturday Denver 2024. This Saturday, come join me at the Lowry Convention Center in Aurora for some great talks. We...
2024-08-14
22 reads
I’m happy to announce that I will be speaking at the first-ever SQL Saturday Syracuse on September 7th, 2024. I will be presenting Answering the Auditor’s Call with Automation
2024-08-14
12 reads
For a limited time, we’ll move your existing WordPress site from any host to WordPress.com for free.
2024-08-13
33 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