2020 Year In Review
TL;DR – It was great and not great I think we can all pretty much agree that in some regards 2020 was horrible, globally. So lets move on… Good...
2021-01-01
22 reads
TL;DR – It was great and not great I think we can all pretty much agree that in some regards 2020 was horrible, globally. So lets move on… Good...
2021-01-01
22 reads
This is a guest post by another friend of Dallas DBAs – Brendan Mason (L|T) Upgrading and migrating databases can be a daunting exercise if it’s not something you...
2020-12-22
55 reads
Today’s post is a guest article from a friend of Dallas DBAs, writer, and fantastic DBA Jules Behrens (B|L) One common performance issue that is not well known that...
2020-12-07 (first published: 2020-11-24)
387 reads
Video walkthrough of renaming or “flipping” databases to minimize down time during a refresh. Most commonly when moving a copy from prod to dev. My Pluralsight courses for new...
2020-10-12
49 reads
My Favorite and Recommended Training Resources As I’ve been in intense, focused SQL Server training for the last year, I thought it would be a great time to share...
2020-07-31 (first published: 2020-07-21)
653 reads
T-SQL Tuesday is a monthly blog party for the SQL Server community. It is the brainchild of Adam Machanic (b|t) and this month’s edition is hosted by Kerry Tyler...
2020-07-22 (first published: 2020-07-14)
446 reads
My Pluralsight course for new SQL Server DBAs (Needs to upgrade to a bigger bowl) Common scenario: Company is using SQL Server Express to save on licensing costs...
2020-07-02
234 reads
Whoo! It’s been six months since my last post. There are reasons for this, none of which are probably valid, but it’s the way it is. I’ve been a...
2020-07-13 (first published: 2020-06-30)
693 reads
We have a double feature for today’s dbatools blog post, as these two commands go hand-in-hand. Todays commands: Dismount-DbaDatabase and Mount-DbaDatabase Detach-DbaDatabase and Attach-DbaDatabase can be used as aliases....
2020-07-01 (first published: 2020-06-24)
218 reads
SQL Server, Virtualization and Storage expert David Klee (b|t)stops by to tell stories ?? Fun stuff: “English and Gibberish” “Learn it like you’re going to teach it” “Kevin Kline...
2020-06-16
91 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