The Community is YOU, Not Any Organization
As I type this, we’re leaving behind spring, and all the amazing events that take place then, and entering the quiet time of summer. After that, we’ll go into...
2024-06-18
30 reads
As I type this, we’re leaving behind spring, and all the amazing events that take place then, and entering the quiet time of summer. After that, we’ll go into...
2024-06-18
30 reads
Recently I was trying to delete a folder and kept getting the “something is using this, try again” dialog. It was annoying, but I couldn’t figure out what process...
2024-06-17 (first published: 2024-05-27)
583 reads
Oh good gosh. Six months without a single blog post. Most important information: I’m not dead. Apologies. The issue is pretty simple. I’m getting old. Ha! Seriously though, I...
2024-06-17
37 reads
I’m very excited to announce I’ve been selected as a speaker for dataMinds Connect 2024, Belgium’s (and maybe/probably/most likely mainland Europe’s) best and greatest Microsoft data platform conference. My...
2024-06-17
18 reads
I recently graduated with a Master’s in Strategic Communication from the University of Delaware. Attending the graduation ceremony with my sister made it a truly memorable experience. Here’s a...
2024-06-17 (first published: 2024-05-28)
302 reads
In the data-driven landscape of 2024, advanced SQL isn't just a nice-to-have, it's a career game-changer. Companies crave professionals who can wrangle data, uncover insights, and drive decision-making. If...
2024-06-16
96 reads
I have a client using Planview Portfolios to manage their PMO. As part of the data warehouse, we want to extract the project data from the Planview REST API....
2024-06-14 (first published: 2024-05-26)
343 reads
Recently I’ve been looking at archiving some data at SQL Saturday, possibly querying it, and perhaps building a data warehouse of sorts. The modern view of data warehousing seems...
2024-06-14 (first published: 2024-05-20)
353 reads
There are several tools out there to make your life easier by creating an ERD for your existing db. Everything works pretty well when you have a small number...
2024-06-12 (first published: 2024-05-23)
591 reads
There were a number of Microsoft Fabric announcements at Microsoft Build yesterday that I wanted to blog about. Everything announced at Build can be found in the Microsoft Build 2024 Book of...
2024-06-12 (first published: 2024-05-22)
262 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