New Course: Understanding and Using Azure SQL Database
At SQLskills, we just launched our new training class on Azure that I will be teaching in Chicago, and my...
2017-04-27
885 reads
At SQLskills, we just launched our new training class on Azure that I will be teaching in Chicago, and my...
2017-04-27
885 reads
There has been some recent controversy over SQL Saturdays after PASS HQ announced some new changes. The changes introduced a...
2016-08-19 (first published: 2016-08-18)
1,872 reads
My very first course has been published on Pluralsight – SQL Server: Consolidation Tactics and Best Practices. In this course I...
2016-07-21
1,507 reads
Today I received an email notifying me that I have been awarded the Microsoft “MVP” award for my second year....
2015-07-01
1,238 reads
I often get asked for advice on how to get started in a career as a DBA or in IT...
2014-12-19 (first published: 2014-12-10)
6,996 reads
I am no longer just a SQLskills Insider, I am now a SQLskills employee. I have accepted an offer to...
2014-12-19
1,308 reads
The blessings continue as Embarcadero offered to support my new book by hosting a book signing and providing 100 copies...
2014-11-04
1,057 reads
I am proud to share that my good friend Andy Leonard has just released a new book. This is also...
2014-10-29
1,883 reads
In early October my third book was published. I have been blessed to be able to work with Joes2Pros for my...
2014-10-29
1,877 reads
On September 30th 2014 Microsoft released service pack 4 for SQL Server 2008. This service pack contains all cumulative updates...
2014-10-01
1,393 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