T-SQL Tuesday #006: A Blobbing We Will Go
Once again it looks like I was early for the T-SQL Tuesday event. Last month I submitted my entry on...
2010-05-11
877 reads
Once again it looks like I was early for the T-SQL Tuesday event. Last month I submitted my entry on...
2010-05-11
877 reads
I think Twitter is a graffiti wall that emulates a series of hallway conversations near the world's largest food court.
2010-05-11
699 reads
Hey there gang ! – It’s been a while since I’ve written and I apologize. It’s shameful I know. I just completed...
2010-05-10
351 reads
Building an audit in SQL Server 2008 is very easy, much easier than in previous versions using SQL Trace. That...
2010-05-10
1,694 reads
Every day for the next couple of weeks, I aim to highlight one of SQL Server 2008’s new features, simply...
2010-05-10
392 reads
Microsoft added a new DMV, sys.dm_db_persisted_sku_features to SQL Server 2008 that you can use to determine whether you have any...
2010-05-10
1,156 reads
Simple-Talk Publishing has released a new, free 291 page eBook called Defensive Database Programming with SQL Server, by Alex Kuznetsov....
2010-05-10
1,805 reads
Started Friday by picking up the shirts for the event in Orlando, then heading to Jacksonville with the family, getting...
2010-05-10
439 reads
OPASS had it’s May meeting on Thursday the 6th sponsored by Confio with Dean Richards presenting Tuna Helper for the...
2010-05-10
489 reads
Everyone is invited to a webcast hosted by the PASS Business Intelligence virtual chapter this Friday, May 14th, as we...
2010-05-10
691 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