SQL Saturday 220 Atlanta GA
That latest installment of SQL Saturday Atlanta was just announced. On May 18th 2013 SQL Server experts from all over...
2013-02-04
636 reads
That latest installment of SQL Saturday Atlanta was just announced. On May 18th 2013 SQL Server experts from all over...
2013-02-04
636 reads
Recently I was brought in to help troubleshoot performance issues on a database server. Going through my typical check list...
2013-01-30
1,962 reads
I was fortunate to attend my 4th PASS Summit. For the past 4 years I have flown out to Seattle...
2012-11-20
677 reads
If you are using Transparent Data Encryption TDE and have Instant File Initialization turned on, you are not getting the...
2012-11-13
953 reads
Many of us know the importance of scripting out our users on a regular bases in order to be able...
2012-11-02
1,988 reads
I was very fortunate to have the opportunity to write a book for Joes2Pros on a topic that is very...
2012-11-01
574 reads
The Red Gate SQL in the City US tour begins tomorrow in New York City. If you have not registered...
2012-09-27
1,433 reads
SQL Saturday #167 is just hours away. We have worked hard to get everything setup and in place and hope...
2012-09-07
579 reads
I was asked to speak at SQL in the City in New York and Austin Texas. I have used many...
2012-09-06 (first published: 2012-09-04)
1,907 reads
Is SQL in the City coming to a town near you? The events are being held in New York, Austin,...
2012-08-29
1,413 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Because we are NABL Accredited Laboratories, our personal care and cosmetics research center provides...
WhatsApp:0817-866-887 Jl. Ahmad Yani No.31, Pattunuang, Kec. Wajo, Kota Makassar, Sulawesi Selatan 90174 (@bcakcumakassar)
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