You pulled BUILTIN\Administrators, but are you auditing?
The conversation on local administrators having rights in SQL Server has proven to be interesting and at times entertaining. My...
2009-12-03
2,532 reads
The conversation on local administrators having rights in SQL Server has proven to be interesting and at times entertaining. My...
2009-12-03
2,532 reads
I’ve fallen behind a little on sharing SQLSaturday news, so I’ll try to catch up on the latest. First, we’re...
2009-12-02
490 reads
SQL Server Standard editor Grant Fritchey needs more content! We’ve got about three done and three more in the pipeline,...
2009-12-02
952 reads
If you missed this, here’s your chance to make it up. If you were there, and like me, you need...
2009-12-02
721 reads
I found a nice post from a friend, Roy Ernest, on an effective way to learn. He notes that one...
2009-12-02
673 reads
I met Tim about a year and a half ago at SQLSaturday Jacksonville and from the start we hit it...
2009-12-02
280 reads
12/03/2009 - UPDATE! There were a couple of bugs in the SQLIOCommandGenerator new SQLIOTools.zip has been updated.
------------------------------------
I often tell people one...
2009-12-02
1,577 reads
Those were the first words out of my wife’s mouth when I told her my laptop had died. She walked...
2009-12-02
843 reads
To use remoting you'll need to install Powershell V2, unless you're running Windows 2008 R2 or Windows 7, you'll need...
2009-12-02
1,201 reads
Andy Warren in the latest PASS Connector has posted an update on where we’re at with the SQL Server Standard....
2009-12-02
648 reads
By Steve Jones
It’s Prime Day. A few of my recommendations, since I want to do some...
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...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp:0818-751-777 Jl. Kalierang No.Ruko 3-5, Dukuhturi, Kec. Bumiayu, Kabupaten Brebes, Jawa Tengah 52273 (@bcakcpbumiayu)
WhatsApp:0818-751-777 Menara Satu Sentra Klp. Gading, Jl. Boulevard Bar. Raya No.1 Lt. Dasar, 1,...
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